From da555fb90840c2d562c3f41b90a059da8e179605 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 5 Sep 2011 12:48:26 +0200 Subject: [PATCH] Fix SCRAM auth of uppercase passwords (EJAB-1196) --- src/scram.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scram.erl b/src/scram.erl index dc1490189..860854ce1 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(jlib:resourceprep(Password), Salt, IterationCount). client_key(SaltedPassword) -> crypto:sha_mac(SaltedPassword, "Client Key").