Fix a bug : update_masterkey generates a token from only one master key and not for the corresponding masterkey

This commit is contained in:
Grégory Soutadé 2017-04-17 20:37:26 +02:00
parent 65f8f0f21e
commit ef82f2640f

View File

@ -782,7 +782,8 @@ function delete_entry(entry_number)
var found = -1;
for(i=0; i<passwords.length; i++)
{
if (passwords[i].ciphered_login == ciphered_login.getAttribute("login"))
if (passwords[i].ciphered_login == ciphered_login.getAttribute("login") ||
passwords[i].shadow_login == ciphered_login.getAttribute("login"))
{
found = i;
break;
@ -916,6 +917,9 @@ async function update_masterkey()
break;
}
if (use_shadow_logins)
await passwords[i].generate_access_token(current_mkey);
global_iv = new_global_iv;
await passwords[i].encrypt(current_mkey);
ok = add_password_server(current_user, passwords[i]);