chore: more safe with iolist_to_binary

Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
This commit is contained in:
zhongwencool 2023-08-29 17:10:43 +08:00 committed by GitHub
parent 2967b709ae
commit 501456efec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -707,7 +707,7 @@ authz(["cache-clean", "all"]) ->
with_log(fun emqx_mgmt:clean_authz_cache_all/0, Msg);
authz(["cache-clean", ClientId]) ->
Msg = io_lib:format("Drain ~ts authz cache", [ClientId]),
with_log(fun() -> emqx_mgmt:clean_authz_cache(list_to_binary(ClientId)) end, Msg);
with_log(fun() -> emqx_mgmt:clean_authz_cache(iolist_to_binary(ClientId)) end, Msg);
authz(_) ->
emqx_ctl:usage(
[