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

Correctly validate WillProperties #210

Merged
merged 1 commit into from
May 4, 2023
Merged

Conversation

mochi-co
Copy link
Collaborator

@mochi-co mochi-co commented May 4, 2023

As noted in #206, WillProperties are currently validated based on the type of the encompassing packet. While the original issue refers to PayloadFormatIndicator, this also includes any Properties specified in https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901027 for Will Properties.

This PR alters the parameters provided to the Properties.Encode and Decode methods to allow passing of a new WillProperties "packet type" (byte 99) in order to indicate the real context of the properties.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4887504288

  • 23 of 23 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.0005%) to 98.599%

Totals Coverage Status
Change from base Build 4885403193: -0.0005%
Covered Lines: 5136
Relevant Lines: 5209

💛 - Coveralls

@mochi-co mochi-co merged commit 1ec8808 into master May 4, 2023
@mochi-co mochi-co deleted the validate-will-properties branch May 4, 2023 21:51
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.

2 participants