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
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ eval_file(Path) ->
maybe_get_scram_auth(Data) ->
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{
storedkey = misc:hex_to_base64(proplists:get_value(<<"stored_key">>, Data, <<"">>)),
serverkey = misc:hex_to_base64(proplists:get_value(<<"server_key">>, Data, <<"">>)),