]> granicus.if.org Git - ejabberd/commitdiff
Fix SCRAM auth of uppercase passwords (EJAB-1196)
authorBadlop <badlop@process-one.net>
Mon, 5 Sep 2011 11:04:26 +0000 (13:04 +0200)
committerBadlop <badlop@process-one.net>
Mon, 5 Sep 2011 11:04:26 +0000 (13:04 +0200)
src/scram.erl

index dc1490189f70535e883f196e04e78b40476071d4..490f98a7e6209a76f8a1bee1d989c3c19433e581 100644 (file)
@@ -37,8 +37,9 @@
         client_key/2
        ]).
 
+%% ejabberd doesn't implement SASLPREP, so we use the similar RESOURCEPREP instead
 salted_password(Password, Salt, IterationCount) ->
-       hi(jlib:nameprep(Password), Salt, IterationCount).
+       hi(exmpp_stringprep:resourceprep(Password), Salt, IterationCount).
 
 client_key(SaltedPassword) ->
        crypto:sha_mac(SaltedPassword, "Client Key").