X-LightYear opened a new pull request, #7300:
URL: https://github.com/apache/rocketmq-dashboard/pull/7300

   ## Summary
   
   - reject blank `topicName` values in the MCP message-send handler
   - align MCP validation with the REST `@NotBlank` topic contract
   - add regression coverage proving no lookup or send occurs for invalid input
   
   ## Root cause
   
   The MCP handler received a typed `MessageSendInput` after catalog 
validation, but the catalog's `minLength` constraint does not reject 
whitespace-only strings and the handler did not perform the REST-equivalent 
non-blank check.
   
   ## Fix
   
   Validate `topicName` with `StringUtils.hasText` before topic lookup in both 
preview and execute paths. Valid topic behavior is unchanged.
   
   ## Testing
   
   - pre-fix deterministic regression failed because a whitespace-only topic 
was accepted
   - `MessageSendToolHandlerTest`: 15 passed
   - checkstyle: 0 violations
   - `git diff --check`: passed
   
   Fixes #7299
   


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