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

Old passwd scram tuples do not conform to current records definitions

This commit is contained in:
Badlop 2020-12-17 17:52:25 +01:00
parent 2ab7da1e8f
commit 1b7502acbc

View File

@ -180,7 +180,7 @@ count_users(Server, _) ->
get_password(User, Server) -> get_password(User, Server) ->
case mnesia:dirty_read(passwd, {User, Server}) of case mnesia:dirty_read(passwd, {User, Server}) of
[#passwd{password = {scram, SK, SEK, Salt, IC}}] -> [{passwd, _, {scram, SK, SEK, Salt, IC}}] ->
{cache, {ok, #scram{storedkey = SK, serverkey = SEK, {cache, {ok, #scram{storedkey = SK, serverkey = SEK,
salt = Salt, hash = sha, iterationcount = IC}}}; salt = Salt, hash = sha, iterationcount = IC}}};
[#passwd{password = Password}] -> [#passwd{password = Password}] ->
@ -277,7 +277,7 @@ transform(#passwd{us = {U, S}, password = Password} = P)
plain -> plain ->
P P
end; end;
transform(#passwd{password = {scram, _, _, _, _}} = P) -> transform({passwd, _, {scram, _, _, _, _}} = P) ->
P; P;
transform(#passwd{password = #scram{}} = P) -> transform(#passwd{password = #scram{}} = P) ->
P. P.