From a712daaebc622cd13c60786f3a348311bf5e816e Mon Sep 17 00:00:00 2001 From: zhouzb Date: Wed, 27 Oct 2021 15:08:02 +0800 Subject: [PATCH] fix(authn): fix bad list comprehension --- apps/emqx_authn/src/simple_authn/emqx_authn_pgsql.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/emqx_authn/src/simple_authn/emqx_authn_pgsql.erl b/apps/emqx_authn/src/simple_authn/emqx_authn_pgsql.erl index 89c489d6d..57a8416df 100644 --- a/apps/emqx_authn/src/simple_authn/emqx_authn_pgsql.erl +++ b/apps/emqx_authn/src/simple_authn/emqx_authn_pgsql.erl @@ -134,7 +134,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], Replacements = ["$" ++ integer_to_list(I) || I <- lists:seq(1, length(Captured))], NQuery = lists:foldl(fun({PlaceHolder, Replacement}, Query0) -> re:replace(Query0, PlaceHolder, Replacement, [{return, binary}])