-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
[SECURITY] Last will messages is not checked against authorization. #211
Comments
Would you like to send a PR for this? For future reference, it’s better to send security vulnerabilities privately. |
When should the authorization be checked then? During connect, or once the connection is broken? In the latter case, what happens if the authorization fails? Will it just ignore the message. And if it checks during connect, what should happen if the authorization fails? Break the connection immediately? Remove the last will? And if it breaks, does it need to send anything? |
Check when the connection is broken, and if it does not pass authorization it’s just silently ignored. IMHO it’s the best way because authorization between connection and disconnection might change. |
The LWT is not checked for authorization.
Simple example:
Now, from a client, connect and subscribe to "will".
From another client, connect with a last will message with topic "will". Then send a message to "test", breaking the connection (because of authorization failure).
Breaking the connection will trigger the LWT, and thus sends a message to "will", which can be seen in the other client.
The text was updated successfully, but these errors were encountered: