btlqql opened a new pull request, #442:
URL: https://github.com/apache/rocketmq-dashboard/pull/442

   ### Summary
   
   - validate audit query pagination before reading repository data
   - use `long` arithmetic for pagination bounds to avoid integer overflow
   - reject zero or negative audit cleanup retention values
   - add regression tests for invalid and extreme inputs
   
   ### Problem and root cause
   
   `AuditService.queryLogs` used unchecked `int` values directly in `subList` 
index calculations. Non-positive inputs could produce invalid indices, and 
multiplying large positive page values could overflow. `cleanupLogs` similarly 
accepted non-positive retention periods, allowing a cutoff at the current time 
or in the future and risking deletion of recent audit entries.
   
   ### Impact
   
   Invalid requests now fail predictably with `BusinessException` code 400 
before repository work begins. Valid large pagination inputs no longer 
overflow, and cleanup always requires a positive retention period.
   
   ### Verification
   
   - `mvn -o -B -ntp -Dtest=AuditServiceTest test` — 16 tests passed
   - `mvn -o -B -ntp test` — 161 tests passed
   - Checkstyle — 0 violations
   - `git diff --cached --check` — passed
   
   Fixes #441
   


-- 
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]

Reply via email to