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

Add validation of string lengths #1718

Conversation

chkr1011
Copy link
Collaborator

This PR adds a check for all string lengths when serializing an MQTT packet in order to check for string which are larger than the allowed maximum specified in the MQTT RFC.
If a string is larger the library will throw an MqttProtocolViolationException.

@chkr1011 chkr1011 changed the title Add validate string lengths Add validation of string lengths Apr 30, 2023
@chkr1011 chkr1011 merged commit 0e815c6 into master May 1, 2023
3 checks passed
@chkr1011 chkr1011 deleted the 1682-writestring-accepts-strings-longer-than-65535bytes-overflowing-length-field branch May 1, 2023 10:03
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.

WriteString accepts strings longer than 65535bytes overflowing length field
1 participant