You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/03 00:50:28 UTC

[I] [BUG] Connection-state guard is dead; unconnected clients can PUBLISH/SUBSCRIBE [shenyu]

Aias00 opened a new issue, #6638:
URL: https://github.com/apache/shenyu/issues/6638

   - severity: High
   - files: `shenyu-protocol/shenyu-protocol-mqtt/src/main/java/org/apache/shenyu/protocol/mqtt/MqttFactory.java:34`; `MessageType.java:31-47`; `Publish.java:47-49`; `Subscribe.java:56-59`; `Unsubscribe.java:41-43`
   - description: `MqttFactory` constructs a fresh `MessageType` per inbound message; `Connect.connect()` calls `setConnected(true)` on the throwaway `Connect` instance, so `isConnected()` never propagates to other handler instances. Combined with inverted guards (`if (isConnected()) return;`), the "reject operations from unauthenticated clients" enforcement never fires — a client that never sent CONNECT can PUBLISH/SUBSCRIBE/UNSUBSCRIBE. Even if state persisted, `if (isConnected()) return;` would block connected clients.
   - impact: No connection-state enforcement; pre-auth PUBLISH/SUBSCRIBE allowed.
   - suggested_fix: Track connection state per-channel (Channel attribute or ChannelRepository); invert guards to `if (!isConnected()) { ...; return; }`.
   - confidence: High
   - related_existing: none
   
   ---
   _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: notifications-unsubscribe@shenyu.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] Connection-state guard is dead; unconnected clients can PUBLISH/SUBSCRIBE [shenyu]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed issue #6638: [BUG] Connection-state guard is dead; unconnected clients can PUBLISH/SUBSCRIBE
URL: https://github.com/apache/shenyu/issues/6638


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] Connection-state guard is dead; unconnected clients can PUBLISH/SUBSCRIBE [shenyu]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6638:
URL: https://github.com/apache/shenyu/issues/6638#issuecomment-5161209282

   👋 Hello @Aias00
   
   A new issue has been opened by @Aias00:
   - **Title**: [BUG] Connection-state guard is dead; unconnected clients can PUBLISH/SUBSCRIBE
   - **Link**: https://github.com/apache/shenyu/issues/6638
   
   Please review when you have time. Thank you! 🙏


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] Connection-state guard is dead; unconnected clients can PUBLISH/SUBSCRIBE [shenyu]

Posted by "wy471x (via GitHub)" <gi...@apache.org>.
wy471x commented on issue #6638:
URL: https://github.com/apache/shenyu/issues/6638#issuecomment-5315597825

   /assign


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org