marvinroger / async-mqtt-client

📶 An Arduino for ESP8266 asynchronous MQTT client implementation
MIT License
837 stars 268 forks source link

Connect with wrong credentials appears like a valid connection #273

Open AcuarioCat opened 2 years ago

AcuarioCat commented 2 years ago

When connecting using credentials that are incorrect it appears the connection is successful. I'm using the default esp8266 sample.

This is the log from a valid connect: Connecting to MQTT... Connected to MQTT. Session present: 0 Subscribing at QoS 2, packetId: 85 Publishing at QoS 0 Publishing at QoS 1, packetId: 86 Publishing at QoS 2, packetId: 87 Subscribe acknowledged. packetId: 85 qos: 2 Publish received. . . .

This is with invalid credentials: Connecting to MQTT... Connected to MQTT. Session present: 0 Subscribing at QoS 2, packetId: 1 Publishing at QoS 0 Publishing at QoS 1, packetId: 2 Publishing at QoS 2, packetId: 3 Subscribe acknowledged. packetId: 1 qos: 2 Publish acknowledged. packetId: 2 Publish acknowledged. packetId: 3

bertmelis commented 2 years ago

That seems to be an issue with your broker. Why would it send acknowledgements when it should reject the client?

AcuarioCat commented 2 years ago

It seems odd. I'm using CloudMQTT which is commercial so I would expect it to behave properly.