From: Badlop Date: Mon, 5 Sep 2011 11:04:26 +0000 (+0200) Subject: Fix SCRAM auth of uppercase passwords (EJAB-1196) X-Git-Tag: v3.0.0-alpha-4~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fed00a0c1761f12ea96217dcdbb40b114221dd07;p=ejabberd Fix SCRAM auth of uppercase passwords (EJAB-1196) --- diff --git a/src/scram.erl b/src/scram.erl index dc1490189..490f98a7e 100644 --- a/src/scram.erl +++ b/src/scram.erl @@ -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").