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

index dc1490189f70535e883f196e04e78b40476071d4..860854ce1e72104dd46e7805fbbc2b34b317f67a 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(jlib:resourceprep(Password), Salt, IterationCount).
 
 client_key(SaltedPassword) ->
        crypto:sha_mac(SaltedPassword, "Client Key").