X-LightYear opened a new issue, #7299:
URL: https://github.com/apache/rocketmq-dashboard/issues/7299

   ## Problem
   
   The REST message-send DTO rejects blank topics with `@NotBlank`, but the MCP 
`rmq.message.send` handler bypasses that validation and can pass a 
whitespace-only topic into the send path.
   
   ## Reproduction
   
   Invoke `rmq.message.send` with:
   
   ```json
   {
     "instanceId": "instance-a",
     "topicName": "   ",
     "body": "hello"
   }
   ```
   
   ## Expected behavior
   
   The request should fail with a structured 400 response before topic lookup 
or provider send work begins, matching the REST contract.
   
   ## Actual behavior
   
   The MCP handler resolves the blank topic and proceeds to the metadata send 
call instead of rejecting it at the tool boundary.
   
   ## Fix
   
   Validate the topic with the same non-blank contract in both preview and 
execute paths. Existing topic-type validation and send behavior remain 
unchanged for valid topics.
   
   ## Testing
   
   - Pre-fix deterministic regression failed because the invalid input was 
accepted.
   - `MessageSendToolHandlerTest`: 15 passed after the fix.
   - Checkstyle: 0 violations.
   - `git diff --check`: passed.
   


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