chore(authn-redis): checking password field

This commit is contained in:
JianBo He 2022-06-30 13:26:58 +08:00
parent 8f696b6f8c
commit 7de23f5863
1 changed files with 2 additions and 2 deletions

View File

@ -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