diff --git a/apps/emqx_management/src/emqx_mgmt_api_topics.erl b/apps/emqx_management/src/emqx_mgmt_api_topics.erl index 6b0e1f622..d451261ff 100644 --- a/apps/emqx_management/src/emqx_mgmt_api_topics.erl +++ b/apps/emqx_management/src/emqx_mgmt_api_topics.erl @@ -139,9 +139,9 @@ lookup(#{topic := Topic}) -> %%%============================================================================================== %% internal generate_topic(Params = #{<<"topic">> := Topic}) -> - Params#{<<"topic">> => uri_string:percent_decode(Topic)}; + Params#{<<"topic">> => Topic}; generate_topic(Params = #{topic := Topic}) -> - Params#{topic => uri_string:percent_decode(Topic)}; + Params#{topic => Topic}; generate_topic(Params) -> Params. diff --git a/changes/ce/fix-10801.en.md b/changes/ce/fix-10801.en.md new file mode 100644 index 000000000..4c36bd528 --- /dev/null +++ b/changes/ce/fix-10801.en.md @@ -0,0 +1 @@ +Avoid duplicated percent decode the topic name in API `/topics/{topic}` and `/topics`.