yyqdbngt opened a new pull request, #2947:
URL: https://github.com/apache/rocketmq-dashboard/pull/2947
## Summary
- escape LIKE wildcards (`%`, `_`, `\`) in the audit log free-text search
before building the query
- add a regression test that the escaped pattern reaches the mapper for all
three searched columns
## Why
`MybatisPlusAuditRepository.findPage` built `.like("operator", search)` (and
the `resource_name`/`detail` branches) from the raw user input, so a search
such as `100%` or `a_b` acted as a wildcard pattern and matched far more rows
than the literal term — `%` alone matched every operator. The message query
history repository already escapes its search terms with the same pattern; the
audit repository was missing it.
## Testing
- `cd server && mvn -q -Dtest=MybatisPlusAuditRepositoryTest test` — all
tests pass, including the new `findPageEscapesLikeWildcardsInSearch`
- `cd server && mvn -q -Dtest=AuditServiceTest,AuditControllerTest test` —
all tests pass (regression for the audit 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]