Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeotov Daniil <hairyhum@gmail.com>2015-02-05 18:44:08 +0300
committerFeotov Daniil <hairyhum@gmail.com>2015-02-05 18:44:08 +0300
commiteb52c118d072c485cfbe16ee3a3f3cff8343ecca (patch)
tree693ffa0a5fdfb8d25ff4fbe9cc2132d14352b7dc /src/ejabberd_auth_riak.erl
parented502673f49ce8a80f210caf3624a5317e44e55d (diff)
Migration of scram passwords with piefxis (riak and internal only)
Diffstat (limited to 'src/ejabberd_auth_riak.erl')
-rw-r--r--src/ejabberd_auth_riak.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ejabberd_auth_riak.erl b/src/ejabberd_auth_riak.erl
index 081ee6bb8..5d631f497 100644
--- a/src/ejabberd_auth_riak.erl
+++ b/src/ejabberd_auth_riak.erl
@@ -125,7 +125,10 @@ set_password(User, Server, Password) ->
try_register(User, Server, PasswordList) ->
LUser = jlib:nodeprep(User),
LServer = jlib:nameprep(Server),
- Password = iolist_to_binary(PasswordList),
+ Password = if is_list(PasswordList); is_binary(PasswordList) ->
+ iolist_to_binary(PasswordList);
+ true -> PasswordList
+ end,
US = {LUser, LServer},
if (LUser == error) or (LServer == error) ->
{error, invalid_jid};