Skip to content

Commit

Permalink
scram: fix client final message
Browse files Browse the repository at this point in the history
The client should send r=ServerNonce rather than r=Salt

Signed-off-by: Noah Watkins <[email protected]>
  • Loading branch information
dotnwat committed Feb 28, 2023
1 parent 16ff7bb commit 3449c86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kpro_scram.erl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ parse(#{ sha := Sha
<<MyNonce:?MY_NONCE_LEN/binary, _/binary>> = ServerNonce,
Salt = base64:decode(Salt0),
SaltedPassword = hi(Sha, Password, Salt, Iterations),
FinalNoProof = bin([?CHANNEL_BINDING, ",r=", Salt]),
FinalNoProof = bin([?CHANNEL_BINDING, ",r=", ServerNonce]),
AuthMsg = [ClientFirstMsgBare, ",", ServerFirstMsg, ",", FinalNoProof],
#{ sha => Sha
, salted_password => SaltedPassword
Expand Down

0 comments on commit 3449c86

Please sign in to comment.