diff options
author | Paweł Chmielowski <pchmielowski@process-one.net> | 2020-02-11 12:48:19 +0100 |
---|---|---|
committer | Paweł Chmielowski <pchmielowski@process-one.net> | 2020-02-11 12:48:19 +0100 |
commit | 66a84b8d2bfcee92485bb9ea2e31f03d282f7b24 (patch) | |
tree | 182d3267eab815567428475119d7874367d8c88a /src/ejabberd_piefxis.erl | |
parent | Remove tweak introduced in 05c2995c for #1954 as it isn't needed anymore (diff) |
Make piefxis import properly decode scram passwords
We encoded scramed password with base64 when exporting, but didn't apply
reverse operation on import, this adds base64 decoding on import.
This fixes issue #3167.
Diffstat (limited to 'src/ejabberd_piefxis.erl')
-rw-r--r-- | src/ejabberd_piefxis.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ejabberd_piefxis.erl b/src/ejabberd_piefxis.erl index 665ad0a8..e4c74177 100644 --- a/src/ejabberd_piefxis.erl +++ b/src/ejabberd_piefxis.erl @@ -193,9 +193,9 @@ parse_scram_password(PassData) -> Split = binary:split(PassData, <<",">>, [global]), [StoredKeyB64, ServerKeyB64, SaltB64, IterationCountBin] = Split, #scram{ - storedkey = StoredKeyB64, - serverkey = ServerKeyB64, - salt = SaltB64, + storedkey = base64:decode(StoredKeyB64), + serverkey = base64:decode(ServerKeyB64), + salt = base64:decode(SaltB64), iterationcount = (binary_to_integer(IterationCountBin)) }. |