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

fix h-b-o #1720 #906

Merged
merged 5 commits into from
Mar 30, 2024
Merged

fix h-b-o #1720 #906

merged 5 commits into from
Mar 30, 2024

Conversation

StargazerWayne
Copy link
Collaborator

No description provided.

Signed-off-by: wayne <yukang.wei@emqx.io>
@StargazerWayne
Copy link
Collaborator Author

not quite sure about this, plz review this.

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.20%. Comparing base (636de82) to head (f9f82d0).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #906      +/-   ##
==========================================
+ Coverage   65.17%   65.20%   +0.02%     
==========================================
  Files         130      130              
  Lines       37911    37911              
==========================================
+ Hits        24709    24719      +10     
+ Misses      13202    13192      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: wayne <yukang.wei@emqx.io>
@StargazerWayne StargazerWayne changed the title * FIX [mqtt_parser] fix h-b-o #1720 fix h-b-o #1720 & enable pure digit for auth password #1716 Mar 29, 2024
@StargazerWayne StargazerWayne changed the title fix h-b-o #1720 & enable pure digit for auth password #1716 fix h-b-o #1720 & enable pure digit, dot for auth password #1716 Mar 29, 2024
Signed-off-by: wayne <yukang.wei@emqx.io>
Signed-off-by: wayne <yukang.wei@emqx.io>
@StargazerWayne StargazerWayne changed the title fix h-b-o #1720 & enable pure digit, dot for auth password #1716 fix h-b-o #1720 & enable pure digit auth password #1716 Mar 29, 2024
if (cparam->pro_ver == MQTT_PROTOCOL_VERSION_v5) {
// check length
log_trace("Decoding MQTT V5 Properties");
if (pos >= max)
if (pos + 4 >= max)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 == 2 (property len) + 2 (clientid len). Am I right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the req of get_var_integer.

// max len of pw is 20.
char strpw[20];
sprintf(strpw, "%d", ele->valueint);
cvector_push_back(auth->passwords, nng_strdup(strpw));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the password can be a number

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think it is really needed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just revert it, gonna update docs and tell users to add "" .

Signed-off-by: wayne <yukang.wei@emqx.io>
@StargazerWayne StargazerWayne changed the title fix h-b-o #1720 & enable pure digit auth password #1716 fix h-b-o #1720 Mar 29, 2024
// max len of pw is 20.
char strpw[20];
sprintf(strpw, "%d", ele->valueint);
cvector_push_back(auth->passwords, nng_strdup(strpw));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think it is really needed

@JaylinYu JaylinYu merged commit 4a71d3d into main Mar 30, 2024
16 checks passed
@JaylinYu JaylinYu deleted the wayne/dev branch March 30, 2024 01:43
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.

3 participants