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

Avoid urldecode clientid twice #10737

Merged
merged 4 commits into from May 19, 2023
Merged

Avoid urldecode clientid twice #10737

merged 4 commits into from May 19, 2023

Conversation

HJianBo
Copy link
Member

@HJianBo HJianBo commented May 18, 2023

Fixes https://emqx.atlassian.net/browse/EMQX-9787 and https://emqx.atlassian.net/browse/EMQX-9783

Summary

🤖 Generated by Copilot at 26b69a5

This pull request improves the HTTP API for gateway clients and listeners, and adds more test cases for the MQTT-SN protocol. It changes the reply function to reply_and_update in emqx_mqttsn_channel.erl to update the client information after a subscription or unsubscription. It also removes redundant decoding of parameters in emqx_gateway_api_clients.erl and emqx_gateway_api_listeners.erl. It adds two test cases in emqx_sn_protocol_SUITE.erl to check the API for complex client ids and subscription updates.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Changed lines covered in coverage report
  • Change log has been added to changes/{ce,ee}/(feat|perf|fix)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • If there should be document changes, a PR to emqx-docs.git is sent, or a jira ticket is created to follow up
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • If changed package build workflow, pass this action (manual trigger)
  • Change log has been added to changes/ dir for user-facing artifacts update

@HJianBo HJianBo marked this pull request as ready for review May 18, 2023 13:37
@HJianBo HJianBo requested review from a team and lafirest as code owners May 18, 2023 13:37
@HJianBo HJianBo merged commit 48ceb14 into emqx:master May 19, 2023
159 checks passed
@HJianBo HJianBo deleted the fix-mqtt-sn-bugs branch May 19, 2023 01:19
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 5012044246

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • 36 unchanged lines in 15 files lost coverage.
  • Overall coverage decreased (-0.03%) to 81.781%

Files with Coverage Reduction New Missed Lines %
apps/emqx_management/src/emqx_mgmt_util.erl 1 13.79%
apps/emqx/src/emqx_banned.erl 1 89.39%
apps/emqx/src/emqx_broker.erl 1 87.64%
apps/emqx/src/emqx_channel.erl 1 87.58%
apps/emqx/src/emqx_connection.erl 1 85.96%
apps/emqx/src/emqx_limiter/src/emqx_limiter_schema.erl 1 75.44%
apps/emqx/src/emqx_logger_textfmt.erl 1 59.09%
apps/emqx/src/emqx_os_mon.erl 1 91.55%
apps/emqx_bridge_sqlserver/src/emqx_bridge_sqlserver_connector.erl 2 81.19%
apps/emqx/src/emqx_alarm.erl 2 89.92%
Totals Coverage Status
Change from base Build 5011198897: -0.03%
Covered Lines: 27095
Relevant Lines: 33131

💛 - Coveralls

@yanzhiemq
Copy link
Collaborator

yanzhiemq commented Jun 13, 2023

Bug Fixes

  • Fixed the issue where the HTTP API interface of Gateway cannot handle ClientIDs with special characters, such as: !@#$%^&*()_+{}:"<>?/.

@yanzhiemq
Copy link
Collaborator

yanzhiemq commented Jun 13, 2023

修复

  • 修复了网关的 HTTP API 接口无法处理包含特殊字符的 ClientID 的问题,例如:!@#$%^&*()_+{}:"<>?/

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.

None yet

5 participants