fix: fix two minor issues of bulti-in authn/authz

1. the `Derived Key Length` for `pbkdf2` should be a positive integer.
2. fix topics in the authorization rules might be parsed incorrectly
This commit is contained in:
firest 2024-07-02 15:25:05 +08:00
parent 51a8d3b041
commit 686f79c036
2 changed files with 2 additions and 2 deletions

View File

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

View File

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