You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/01/05 09:13:53 UTC

[GitHub] jiangphcn commented on a change in pull request #1087: Return friendly error message when creating user with invalid password

jiangphcn 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_r159834033
 
 

 ##########
 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:
   Good suggestion. Added

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services