From 4ae38b7c6a64a9538160b040a79d8fa2ff6a4cbc Mon Sep 17 00:00:00 2001 From: zhouzb Date: Wed, 20 Oct 2021 10:14:47 +0800 Subject: [PATCH 1/3] fix(authn): fix placeholders are not replaced correctly --- apps/emqx_authn/src/simple_authn/emqx_authn_mysql.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/emqx_authn/src/simple_authn/emqx_authn_mysql.erl b/apps/emqx_authn/src/simple_authn/emqx_authn_mysql.erl index b4c6dac08..cd658e6f1 100644 --- a/apps/emqx_authn/src/simple_authn/emqx_authn_mysql.erl +++ b/apps/emqx_authn/src/simple_authn/emqx_authn_mysql.erl @@ -144,7 +144,7 @@ destroy(#{'_unique' := Unique}) -> parse_query(Query) -> case re:run(Query, ?RE_PLACEHOLDER, [global, {capture, all, binary}]) of {match, Captured} -> - PlaceHolders = [PlaceHolder || PlaceHolder <- Captured], + PlaceHolders = [PlaceHolder || [PlaceHolder] <- Captured], NQuery = re:replace(Query, "'\\$\\{[a-z0-9\\_]+\\}'", "?", [global, {return, binary}]), {NQuery, PlaceHolders}; nomatch -> From 79b5ddb0a7ad203eadb04ce0b277ad12ed716c5c Mon Sep 17 00:00:00 2001 From: zhouzb Date: Wed, 20 Oct 2021 18:07:07 +0800 Subject: [PATCH 2/3] chore(deps): update version of hocon --- rebar.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebar.config b/rebar.config index 89b8e3a9f..a21341d56 100644 --- a/rebar.config +++ b/rebar.config @@ -61,7 +61,7 @@ , {observer_cli, "1.7.1"} % NOTE: depends on recon 2.5.x , {getopt, "1.0.2"} , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.14.1"}}} - , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.19.6"}}} + , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.20.3"}}} , {emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.4.1"}}} , {esasl, {git, "https://github.com/emqx/esasl", {tag, "0.2.0"}}} , {jose, {git, "https://github.com/potatosalad/erlang-jose", {tag, "1.11.1"}}} From ef731c74ebdba7d55a1e8eb0bb67d18d55dd292b Mon Sep 17 00:00:00 2001 From: zhouzb Date: Thu, 21 Oct 2021 09:35:00 +0800 Subject: [PATCH 3/3] chore(deps): unify version of hocon --- apps/emqx/rebar.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/emqx/rebar.config b/apps/emqx/rebar.config index b851700b9..7e4f22345 100644 --- a/apps/emqx/rebar.config +++ b/apps/emqx/rebar.config @@ -17,7 +17,7 @@ , {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.0"}}} , {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.10.9"}}} , {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.5.1"}}} - , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.19.6"}}} + , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.20.3"}}} , {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}} , {recon, {git, "https://github.com/ferd/recon", {tag, "2.5.1"}}} , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.14.1"}}}