Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: verify payload of SubscribeMultiple is not empty #385

Merged
merged 1 commit into from Dec 20, 2019

Conversation

robbawebba
Copy link
Contributor

MQTT protocol 3.1.1 specifies that the payload in a SUBSCRIBE packet
must not be empty and must contain at least one topic filter and QoS
pair. Validate the input to SubscribeMultiple meets this requirement to
avoid protocol errors when communicating with a broker.

Fixes #384

Signed-off-by: Robert Weber robertweber95@gmail.com

client.go Outdated Show resolved Hide resolved
MQTT protocol 3.1.1 specifies that the payload in a SUBSCRIBE packet
must not be empty and must contain at least one topic filter and QoS
pair. Validate the input to SubscribeMultiple meets this requirement to
avoid protocol errors when communicating with a broker.

Fixes eclipse#384

Signed-off-by: Robert Weber <robertweber95@gmail.com>
@robbawebba robbawebba force-pushed the fix/SubscribeMultiple-empty-filter branch from 6952317 to ca5affb Compare November 18, 2019 18:22
@robbawebba robbawebba requested a review from alsm November 18, 2019 18:23
@alsm
Copy link
Contributor

alsm commented Dec 20, 2019

Thanks

@alsm alsm merged commit 99e1673 into eclipse:master Dec 20, 2019
@someburner
Copy link

@MattBrittan @alsm I also ran into this issue, but when I accidentally published to an empty topic "". Perhaps there should be a check in publish similar to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SubscribeMultiple accepts an empty map of topics
3 participants