123123213weqw opened a new pull request, #2315:
URL: https://github.com/apache/rocketmq-dashboard/pull/2315

   ## What is the purpose of the change
   
   `rmq.message.query` parsed caller-supplied `startTime`/`endTime` timestamps 
with `Number.longValue()`. Jackson delivers larger-than-Long values as 
`BigInteger`, and `longValue()` silently wraps them into a nonsense, possibly 
negative, epoch-millis timestamp instead of rejecting them. String arguments 
were routed through `Long.parseLong()`, whose `NumberFormatException` 
propagated as a generic HTTP 500.
   
   ## Brief changelog
   
   - Convert numeric timestamps with `BigInteger.longValueExact()` and reject 
out-of-range / non-finite floating-point values with HTTP 400 instead of 
silently wrapping.
   - Map unparseable string and unrepresentable numeric timestamps to HTTP 400 
(BusinessException) rather than HTTP 500.
   - Added `MessageQueryToolHandlerTest` cases: above-Long-range, non-finite, 
non-numeric rejection and in-range BigInt exact conversion.
   
   ## How was this patch verified
   
   - `mvn -Dtest=MessageQueryToolHandlerTest test` -> 6/6 passed
   - `git diff --check` clean
   


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