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

   ## Summary
   
   Escape SQL LIKE wildcards in two remaining search paths that were not 
covered by the earlier per-surface fixes (#4223, #4229, #4192, #4193, #4194, 
#4232).
   
   ## Problem
   
   - `MybatisPlusSettingsRepository.findDataSources` passed the raw search 
string into `like("json", ...)`.
   - `RocketMQMetadataProvider` passed the raw search string into 
`like(RmqTopic::getName, ...)` / `like(RmqGroup::getName, ...)`.
   
   Topic/group names and data source content can contain `%` and `_`, so a 
search treated those as LIKE wildcards and silently matched unrelated rows.
   
   ## Fix
   
   Introduce a shared `SqlLikeUtils.escape` helper (extracted from the escaping 
already used by `QueryHistoryService`) and apply it to the remaining unescaped 
predicates.
   
   ## Test plan
   
   Added `SqlLikeUtilsTest`. `mvn test -Dtest=SqlLikeUtilsTest` — 2 tests, 0 
failures.


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