Sfoglia il codice sorgente

Merge pull request #13389 from lafirest/fix/builtin_acl

fix: fix two minor issues of bulti-in authn/authz
lafirest 1 anno fa
parent
commit
dea2bf19b1

+ 1 - 1
apps/emqx_auth/src/emqx_authn/emqx_authn_password_hashing.erl

@@ -142,7 +142,7 @@ salt_position(desc) -> "Salt position for PLAIN, MD5, SHA, SHA256 and SHA512 alg
 salt_position(_) -> undefined.
 
 dk_length(type) ->
-    integer();
+    pos_integer();
 dk_length(required) ->
     false;
 dk_length(desc) ->

+ 1 - 1
apps/emqx_auth/src/emqx_authz/emqx_authz_rule_raw.erl

@@ -98,7 +98,7 @@ validate_rule_topics(RuleRaw) ->
     throw({missing_topic_or_topics, RuleRaw}).
 
 validate_rule_topic(<<"eq ", TopicRaw/binary>>) ->
-    {eq, validate_rule_topic(TopicRaw)};
+    {eq, TopicRaw};
 validate_rule_topic(TopicRaw) when is_binary(TopicRaw) -> TopicRaw.
 
 validate_rule_permission(<<"allow">>) -> allow;

+ 3 - 0
changes/ce/fix-13389.en.md

@@ -0,0 +1,3 @@
+Fixed that the `Derived Key Length` for `pbkdf2` could be set to a negative integer.
+
+Fixed topics in the authorization rules might be parsed incorrectly.