yyqdbngt opened a new pull request, #2937:
URL: https://github.com/apache/rocketmq-dashboard/pull/2937
## Summary
- `QueryHistoryService.listMessageQueries` rejects unknown `queryType`
filters with a 400 before querying
- accept only the recorded vocabulary `MSG_ID`/`KEY`/`TOPIC` (or an absent
filter)
- add regression coverage for accepted and rejected query types
## Why
The controller passes the raw user-supplied filter straight into
`.eq("query_type", ...)`, but only the values written by
`MessageService#recordMessageQuery` (`MSG_ID`, `KEY`, `TOPIC`) can ever match a
row. A filter such as `msg_id` or `TOPIC ` therefore returned a silent empty
page instead of surfacing a validation error, which read like "no history" to
the user.
## Testing
- `cd server && mvn -q -Dtest=QueryHistoryServiceTest test` — all tests
pass, including the new `rejectsUnknownMessageHistoryQueryTypeBeforeQuerying`
and `acceptsEveryRecordedMessageHistoryQueryType`
- `cd server && mvn -q -Dtest=QueryHistoryControllerTest test` — all tests
pass (regression for the history endpoints)
--
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]