btlqql opened a new issue, #441: URL: https://github.com/apache/rocketmq-dashboard/issues/441
### Problem `AuditService.queryLogs` currently accepts non-positive `page` and `pageSize` values and calculates its offset using `int` arithmetic. Invalid values can cause `subList` index failures, while sufficiently large valid integers can overflow and return the wrong page or fail unexpectedly. `AuditService.cleanupLogs` also accepts zero or negative `beforeDays`. A zero value uses the current time as the cutoff, and a negative value moves the cutoff into the future, which can delete recent audit data instead of enforcing a positive retention period. ### Expected behavior - Reject non-positive pagination values with a clear client error. - Calculate pagination bounds without integer overflow. - Reject non-positive audit retention values before calling the repository. ### Proposed fix Validate the service inputs with `BusinessException` code 400, use `long` arithmetic for pagination bounds, and add regression tests for invalid and extreme values. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
