浏览代码

chore(authn-redis): checking password field

JianBo He 3 年之前
父节点
当前提交
7de23f5863
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      apps/emqx_authn/src/simple_authn/emqx_authn_redis.erl

+ 2 - 2
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