mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +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,
|
#scram{storedkey = StoredKey,
|
||||||
serverkey = ServerKey,
|
serverkey = ServerKey,
|
||||||
salt = Salt,
|
salt = Salt,
|
||||||
iterationcount = jlib:binary_to_integer(
|
iterationcount = binary_to_integer(
|
||||||
IterationCount)},
|
IterationCount)},
|
||||||
is_password_scram_valid(Password, Scram);
|
is_password_scram_valid(Password, Scram);
|
||||||
{selected, [<<"password">>, <<"serverkey">>,
|
{selected, [<<"password">>, <<"serverkey">>,
|
||||||
@ -168,7 +168,7 @@ set_password(User, Server, Password) ->
|
|||||||
ejabberd_odbc:escape(Scram#scram.storedkey),
|
ejabberd_odbc:escape(Scram#scram.storedkey),
|
||||||
ejabberd_odbc:escape(Scram#scram.serverkey),
|
ejabberd_odbc:escape(Scram#scram.serverkey),
|
||||||
ejabberd_odbc:escape(Scram#scram.salt),
|
ejabberd_odbc:escape(Scram#scram.salt),
|
||||||
jlib:integer_to_binary(Scram#scram.iterationcount)
|
integer_to_binary(Scram#scram.iterationcount)
|
||||||
)
|
)
|
||||||
of
|
of
|
||||||
{atomic, ok} -> ok;
|
{atomic, ok} -> ok;
|
||||||
@ -204,7 +204,7 @@ try_register(User, Server, Password) ->
|
|||||||
ejabberd_odbc:escape(Scram#scram.storedkey),
|
ejabberd_odbc:escape(Scram#scram.storedkey),
|
||||||
ejabberd_odbc:escape(Scram#scram.serverkey),
|
ejabberd_odbc:escape(Scram#scram.serverkey),
|
||||||
ejabberd_odbc:escape(Scram#scram.salt),
|
ejabberd_odbc:escape(Scram#scram.salt),
|
||||||
jlib:integer_to_binary(Scram#scram.iterationcount)
|
integer_to_binary(Scram#scram.iterationcount)
|
||||||
) of
|
) of
|
||||||
{updated, 1} -> {atomic, ok};
|
{updated, 1} -> {atomic, ok};
|
||||||
_ -> {atomic, exists}
|
_ -> {atomic, exists}
|
||||||
@ -278,7 +278,7 @@ get_password(User, Server) ->
|
|||||||
{jlib:decode_base64(StoredKey),
|
{jlib:decode_base64(StoredKey),
|
||||||
jlib:decode_base64(ServerKey),
|
jlib:decode_base64(ServerKey),
|
||||||
jlib:decode_base64(Salt),
|
jlib:decode_base64(Salt),
|
||||||
jlib:binary_to_integer(IterationCount)};
|
binary_to_integer(IterationCount)};
|
||||||
_ -> false
|
_ -> false
|
||||||
end;
|
end;
|
||||||
false ->
|
false ->
|
||||||
@ -439,7 +439,7 @@ convert_to_scram(Server) ->
|
|||||||
case ejabberd_odbc:sql_query_t(
|
case ejabberd_odbc:sql_query_t(
|
||||||
[<<"select username, password from users where "
|
[<<"select username, password from users where "
|
||||||
"iterationcount=0 limit ">>,
|
"iterationcount=0 limit ">>,
|
||||||
jlib:integer_to_binary(?BATCH_SIZE),
|
integer_to_binary(?BATCH_SIZE),
|
||||||
<<";">>]) of
|
<<";">>]) of
|
||||||
{selected, [<<"username">>, <<"password">>], []} ->
|
{selected, [<<"username">>, <<"password">>], []} ->
|
||||||
ok;
|
ok;
|
||||||
@ -453,7 +453,7 @@ convert_to_scram(Server) ->
|
|||||||
ejabberd_odbc:escape(Scram#scram.storedkey),
|
ejabberd_odbc:escape(Scram#scram.storedkey),
|
||||||
ejabberd_odbc:escape(Scram#scram.serverkey),
|
ejabberd_odbc:escape(Scram#scram.serverkey),
|
||||||
ejabberd_odbc:escape(Scram#scram.salt),
|
ejabberd_odbc:escape(Scram#scram.salt),
|
||||||
jlib:integer_to_binary(Scram#scram.iterationcount)
|
integer_to_binary(Scram#scram.iterationcount)
|
||||||
)
|
)
|
||||||
end, Rs),
|
end, Rs),
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user