mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Fix compilation on Erlang R15B
This commit is contained in:
parent
477d27a3dc
commit
a5d6044448
@ -83,7 +83,7 @@ check_password(User, Server, Password) ->
|
||||
#scram{storedkey = StoredKey,
|
||||
serverkey = ServerKey,
|
||||
salt = Salt,
|
||||
iterationcount = binary_to_integer(
|
||||
iterationcount = jlib:binary_to_integer(
|
||||
IterationCount)},
|
||||
is_password_scram_valid(Password, Scram);
|
||||
{selected, [<<"password">>, <<"serverkey">>,
|
||||
@ -168,7 +168,7 @@ set_password(User, Server, Password) ->
|
||||
ejabberd_odbc:escape(Scram#scram.storedkey),
|
||||
ejabberd_odbc:escape(Scram#scram.serverkey),
|
||||
ejabberd_odbc:escape(Scram#scram.salt),
|
||||
integer_to_binary(Scram#scram.iterationcount)
|
||||
jlib:integer_to_binary(Scram#scram.iterationcount)
|
||||
)
|
||||
of
|
||||
{atomic, ok} -> ok;
|
||||
@ -204,7 +204,7 @@ try_register(User, Server, Password) ->
|
||||
ejabberd_odbc:escape(Scram#scram.storedkey),
|
||||
ejabberd_odbc:escape(Scram#scram.serverkey),
|
||||
ejabberd_odbc:escape(Scram#scram.salt),
|
||||
integer_to_binary(Scram#scram.iterationcount)
|
||||
jlib:integer_to_binary(Scram#scram.iterationcount)
|
||||
) of
|
||||
{updated, 1} -> {atomic, ok};
|
||||
_ -> {atomic, exists}
|
||||
@ -278,7 +278,7 @@ get_password(User, Server) ->
|
||||
{jlib:decode_base64(StoredKey),
|
||||
jlib:decode_base64(ServerKey),
|
||||
jlib:decode_base64(Salt),
|
||||
binary_to_integer(IterationCount)};
|
||||
jlib:binary_to_integer(IterationCount)};
|
||||
_ -> false
|
||||
end;
|
||||
false ->
|
||||
@ -439,7 +439,7 @@ convert_to_scram(Server) ->
|
||||
case ejabberd_odbc:sql_query_t(
|
||||
[<<"select username, password from users where "
|
||||
"iterationcount=0 limit ">>,
|
||||
integer_to_binary(?BATCH_SIZE),
|
||||
jlib:integer_to_binary(?BATCH_SIZE),
|
||||
<<";">>]) of
|
||||
{selected, [<<"username">>, <<"password">>], []} ->
|
||||
ok;
|
||||
@ -453,7 +453,7 @@ convert_to_scram(Server) ->
|
||||
ejabberd_odbc:escape(Scram#scram.storedkey),
|
||||
ejabberd_odbc:escape(Scram#scram.serverkey),
|
||||
ejabberd_odbc:escape(Scram#scram.salt),
|
||||
integer_to_binary(Scram#scram.iterationcount)
|
||||
jlib:integer_to_binary(Scram#scram.iterationcount)
|
||||
)
|
||||
end, Rs),
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user