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

View File

@ -180,7 +180,7 @@ count_users(Server, _) ->
get_password(User, Server) ->
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,
salt = Salt, hash = sha, iterationcount = IC}}};
[#passwd{password = Password}] ->
@ -277,7 +277,7 @@ transform(#passwd{us = {U, S}, password = Password} = P)
plain ->
P
end;
transform(#passwd{password = {scram, _, _, _, _}} = P) ->
transform({passwd, _, {scram, _, _, _, _}} = P) ->
P;
transform(#passwd{password = #scram{}} = P) ->
P.