24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-02 21:17:12 +02:00

Fix SCRAM auth of uppercase passwords (EJAB-1196)

This commit is contained in:
Badlop 2011-09-05 13:04:26 +02:00
parent 4fcff0b6b9
commit fed00a0c17

View File

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