Aias00 opened a new issue, #6748:
URL: https://github.com/apache/shenyu/issues/6748
- severity: Medium
- files:
`shenyu-plugin/shenyu-plugin-mcp-server/src/main/java/org/apache/shenyu/plugin/mcp/server/McpServerPlugin.java:608-613`
- description: The SSE `/message` endpoint returns
`String.format("{\"message\":\"%s\"}", result.getResponseBody())` then
`responseBody.getBytes()`. Any `"`/`\`/control char in the message breaks the
JSON. `getBytes()` uses platform default charset (inconsistent with line 479
which uses `StandardCharsets.UTF_8`).
- impact: Malformed JSON for messages containing quotes/backslashes;
encoding corruption for non-ASCII.
- suggested_fix: Serialize with shared `ObjectMapper` and
`getBytes(StandardCharsets.UTF_8)`.
- confidence: High
- related_existing: none — PERF-22 is perf; this is escaping/encoding.
---
_Identified during the 2026-08-02 deep re-scan; full list in
[`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._
--
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]