mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-24 17:29:28 +01:00
Revert "Fix compilation on Erlang R15B"
This reverts commit a5d6044448
.
This commit is contained in:
parent
6aeb9dcb38
commit
6a23cad454
@ -83,7 +83,7 @@ check_password(User, Server, Password) ->
|
||||
#scram{storedkey = StoredKey,
|
||||
serverkey = ServerKey,
|
||||
salt = Salt,
|
||||
iterationcount = jlib:binary_to_integer(
|
||||
iterationcount = 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),
|
||||
jlib:integer_to_binary(Scram#scram.iterationcount)
|
||||
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),
|
||||
jlib:integer_to_binary(Scram#scram.iterationcount)
|
||||
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),
|
||||
jlib:binary_to_integer(IterationCount)};
|
||||
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 ">>,
|
||||
jlib:integer_to_binary(?BATCH_SIZE),
|
||||
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),
|
||||
jlib:integer_to_binary(Scram#scram.iterationcount)
|
||||
integer_to_binary(Scram#scram.iterationcount)
|
||||
)
|
||||
end, Rs),
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user