mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 17:59:31 +02:00
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.
This commit is contained in:
parent
5574b21dd6
commit
66a84b8d2b
1 changed files with 3 additions and 3 deletions
|
@ -193,9 +193,9 @@ parse_scram_password(PassData) ->
|
||||||
Split = binary:split(PassData, <<",">>, [global]),
|
Split = binary:split(PassData, <<",">>, [global]),
|
||||||
[StoredKeyB64, ServerKeyB64, SaltB64, IterationCountBin] = Split,
|
[StoredKeyB64, ServerKeyB64, SaltB64, IterationCountBin] = Split,
|
||||||
#scram{
|
#scram{
|
||||||
storedkey = StoredKeyB64,
|
storedkey = base64:decode(StoredKeyB64),
|
||||||
serverkey = ServerKeyB64,
|
serverkey = base64:decode(ServerKeyB64),
|
||||||
salt = SaltB64,
|
salt = base64:decode(SaltB64),
|
||||||
iterationcount = (binary_to_integer(IterationCountBin))
|
iterationcount = (binary_to_integer(IterationCountBin))
|
||||||
}.
|
}.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue