Aias00 opened a new issue, #6637: URL: https://github.com/apache/shenyu/issues/6637
- severity: High - files: `shenyu-protocol/shenyu-protocol-mqtt/src/main/java/org/apache/shenyu/protocol/mqtt/Connect.java:54-57` - description: After `close(ctx, CONNECTION_REFUSED_UNACCEPTABLE_PROTOCOL_VERSION)` at line 56 there is no `return`. Execution falls through into the auth check, `ChannelRepository.add(...)` registration, a second CONNECTION_ACCEPTED CONNACK (line 70-74), and `setConnected(true)`. `close()` is async (`ctx.close()` + `CLOSE_ON_FAILURE` listener), so both refusal and acceptance CONNACKs can be written. - impact: Client using unsupported MQTT version is still registered as a live session and may receive CONNECTION_ACCEPTED, defeating protocol-version enforcement and producing double CONNACKs. - suggested_fix: Add `return;` after `close(...)` (matching the clientId-empty branch at line 51). - confidence: High - related_existing: none — baseline only covers hardcoded creds / unsalted MD5. --- _Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.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]
