eclipse-paho / eclipse-paho/paho.mqtt.java

MqttAuth getMessageInfo() should return 0 not 1

Open
#980 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

Please fill out the form below before submitting, thank you!

- [Y] Bug exists Release Version 1.2.5 ( Master Branch)
- [N ] Bug exists in MQTTv3 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)
- [Y] Bug exists in MQTTv5 Client on Snapshot Version 1.2.6-SNAPSHOT (Develop Branch)

The MQTT 5 Auth packet sends a 1 in the 4 reserved bits instead of 0, as per the MQTT spec

"Bits 3,2,1 and 0 of the Fixed Header of the AUTH packet are reserved and MUST all be set to 0. The Client or Server MUST treat any other value as malformed and close the Network Connection [MQTT-3.15.1-1]."

This causes any broker to receive a Auth packet from paho to close the connection.

The simple fix is to simple return 0 in the getMessageInfo() function in MqttAuth.java line 107

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.