Netty version: 4.2.13
While testing MQTT 5 acknowledgements and control packets, I found that User Properties can be present in the message object but missing on the wire after encoding.
MqttProperties.isEmpty() only checks the regular props map and ignores userProperties and subscriptionIds. Because of that, MQTT 5 encoding paths that decide whether to write the reason code and properties based on
properties.isEmpty() can incorrectly take the shortest form and skip property encoding entirely.
This affects at least:
- PUBACK
- PUBREC
- PUBREL
- PUBCOMP
- DISCONNECT
- AUTH
when reasonCode == 0 and the properties only contain User Property values.
Netty version: 4.2.13
While testing MQTT 5 acknowledgements and control packets, I found that User Properties can be present in the message object but missing on the wire after encoding.
MqttProperties.isEmpty() only checks the regular props map and ignores userProperties and subscriptionIds. Because of that, MQTT 5 encoding paths that decide whether to write the reason code and properties based on
properties.isEmpty() can incorrectly take the shortest form and skip property encoding entirely.
This affects at least:
when reasonCode == 0 and the properties only contain User Property values.