Project: springxd
Issue XD-1099: Controllers - Disallow negative pageSize values
Currently you can specify negative pageSize values - The controllers should validatate that. Right now an internal exception is being return, leaking internal details to the caller - E.g.: **http://localhost:9393/batch/executions?pageSize=-1** results in: {code} StatementCallback; bad SQL grammar [SELECT TOP -1 E.JOB_EXECUTION_ID, E.START_TIME, E.END_TIME, E.STATUS, E.EXIT_CODE, E.EXIT_MESSAGE, E.CREATE_TIME, E.LAST_UPDATED, E.VERSION, I.JOB_INSTANCE_ID, I.JOB_NAME FROM BATCH_JOB_EXECUTION E, BATCH_JOB_INSTANCE I WHERE E.JOB_INSTANCE_ID=I.JOB_INSTANCE_ID ORDER BY E.JOB_EXECUTION_ID DESC]; nested exception is java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: TOP {code}
Story points: 2