25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Fix parsing of scram password from prosody

Looks like parsed integer no longer are convered to floats on erlang side,
so let's make check for them less restrictive.
This commit is contained in:
Paweł Chmielowski 2022-05-17 12:23:12 +02:00
parent 553a1ccadf
commit 99064548e8

View File

@ -130,7 +130,7 @@ eval_file(Path) ->
maybe_get_scram_auth(Data) -> maybe_get_scram_auth(Data) ->
case proplists:get_value(<<"iteration_count">>, Data, no_ic) of case proplists:get_value(<<"iteration_count">>, Data, no_ic) of
IC when is_float(IC) -> %% A float like 4096.0 is read IC when is_number(IC) ->
#scram{ #scram{
storedkey = misc:hex_to_base64(proplists:get_value(<<"stored_key">>, Data, <<"">>)), storedkey = misc:hex_to_base64(proplists:get_value(<<"stored_key">>, Data, <<"">>)),
serverkey = misc:hex_to_base64(proplists:get_value(<<"server_key">>, Data, <<"">>)), serverkey = misc:hex_to_base64(proplists:get_value(<<"server_key">>, Data, <<"">>)),