From 7de23f5863367a3599d08ed218e6bfc4e8db5dda Mon Sep 17 00:00:00 2001 From: JianBo He Date: Thu, 30 Jun 2022 13:26:58 +0800 Subject: [PATCH] chore(authn-redis): checking password field --- apps/emqx_authn/src/simple_authn/emqx_authn_redis.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/emqx_authn/src/simple_authn/emqx_authn_redis.erl b/apps/emqx_authn/src/simple_authn/emqx_authn_redis.erl index 6c0839a1b..d0958546d 100644 --- a/apps/emqx_authn/src/simple_authn/emqx_authn_redis.erl +++ b/apps/emqx_authn/src/simple_authn/emqx_authn_redis.erl @@ -210,8 +210,8 @@ parse_cmd(Cmd) -> end. check_fields(Fields) -> - HasPassHash = lists:member("password_hash", Fields), - KnownFields = ["password_hash", "salt", "is_superuser"], + HasPassHash = lists:member("password_hash", Fields) orelse lists:member("password", Fields), + KnownFields = ["password_hash", "password", "salt", "is_superuser"], UnknownFields = [F || F <- Fields, not lists:member(F, KnownFields)], case {HasPassHash, UnknownFields} of