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

Deal with empty user names some way #91

Closed
halfgaar opened this issue Mar 4, 2024 · 1 comment
Closed

Deal with empty user names some way #91

halfgaar opened this issue Mar 4, 2024 · 1 comment

Comments

@halfgaar
Copy link
Owner

halfgaar commented Mar 4, 2024

FlashMQ currently doesn't except MQTT connect packets that flag a username as present, but is empty. It says:

Username flagged as present, but it's 0 bytes.

The MQTT spec says:

If the User Name Flag is set to 1, a user name MUST be present in the payload

But, there is some ambiguity if a zero byte username means 'present'. FlashMQ has the current behavior to not have two ways of having an anonymous login.

But, because other servers do accept this situation, we should deal with it. Perhaps with a config option.

halfgaar added a commit that referenced this issue Mar 16, 2024
There are many clients out there who set the 'username' flag in connect
and then set an empty username. The default is to not have two methods
of signalling anonymous clients, but this can be overriden.

#91
@halfgaar
Copy link
Owner Author

Fixed with the new option zero_byte_username_is_anonymous in the new release.

https://www.flashmq.org/2024/03/29/flashmq-1-11-0-released/

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

No branches or pull requests

1 participant