Aias00 opened a new issue, #6847: URL: https://github.com/apache/shenyu/issues/6847
## Description `msg.payload().passwordInBytes()` returns null for any CONNECT whose connect-flags password bit is 0 (valid MQTT client — anonymous or username-only). It is passed into `MqttContext.isValid`, which calls `new String((byte[]) null)` → NPE. ## Location - `shenyu-protocol/shenyu-protocol-mqtt/src/main/java/org/apache/shenyu/protocol/mqtt/Connect.java:60-62` - `shenyu-protocol/shenyu-protocol-mqtt/src/main/java/org/apache/shenyu/protocol/mqtt/MqttContext.java:48` ## Impact Handler thread throws; client never receives a CONNACK and the connection hangs. ## Suggested fix Null-check `passwordInBytes` in `MqttContext.isValid` (treat null as empty). ## Related existing Distinct from MQTT-09 (#6748, charset decoding of a non-null password) — this is a null-deref on a missing password. -- 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]
