yyqdbngt opened a new issue, #2187:
URL: https://github.com/apache/rocketmq-dashboard/issues/2187

   ### What happened?
   
   The default cloud topic-consumer pagination calculates `(page - 1) * 
pageSize` as an `int`. Both values pass request validation independently, but a 
request such as `page=2147483647&pageSize=100` overflows the offset to a 
negative value and reaches `subList`, producing an `IndexOutOfBoundsException` 
and a 500 response.
   
   ### Expected behavior
   
   Calculate the offset without integer overflow. Pages beyond the available 
consumer list should return an empty page with the correct total instead of 
failing the request.
   
   ### Reproduction
   
   Call the topic-consumer listing endpoint for a cloud-backed provider with 
`page=Integer.MAX_VALUE` and `pageSize=100`. The default `InstanceProvider` 
pagination path computes a negative start index.


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