rnewson commented on a change in pull request #1087: Return friendly error message when creating user with invalid password URL: https://github.com/apache/couchdb/pull/1087#discussion_r159784087
########## File path: src/couch/src/couch_passwords.erl ########## @@ -23,7 +23,10 @@ %% legacy scheme, not used for new passwords. -spec simple(binary(), binary()) -> binary(). simple(Password, Salt) when is_binary(Password), is_binary(Salt) -> - ?l2b(couch_util:to_hex(crypto:hash(sha, <<Password/binary, Salt/binary>>))). + ?l2b(couch_util:to_hex(crypto:hash(sha, <<Password/binary, Salt/binary>>))); +simple(Password, Salt) when is_binary(Salt) -> Review comment: How about another clause for when the salt field is not a string? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
