From 1aeaa794e17ca3238dc4bdacd64c38514c550794 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 15 Mar 2017 11:42:16 +0100 Subject: [PATCH] Encode in base64 when getting scram data with import_prosody (#1549) --- src/prosody2ejabberd.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/prosody2ejabberd.erl b/src/prosody2ejabberd.erl index 5dd0b6766..34e8ac9e1 100644 --- a/src/prosody2ejabberd.erl +++ b/src/prosody2ejabberd.erl @@ -113,9 +113,9 @@ 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 #scram{ - storedkey = proplists:get_value(<<"stored_key">>, Data, <<"">>), - serverkey = proplists:get_value(<<"server_key">>, Data, <<"">>), - salt = proplists:get_value(<<"salt">>, Data, <<"">>), + storedkey = jlib:encode_base64(proplists:get_value(<<"stored_key">>, Data, <<"">>)), + serverkey = jlib:encode_base64(proplists:get_value(<<"server_key">>, Data, <<"">>)), + salt = jlib:encode_base64(proplists:get_value(<<"salt">>, Data, <<"">>)), iterationcount = round(IC) }; _ -> <<"">> -- 2.40.0