Fix minor error : crypto_v2_logins_size must be always updated

This commit is contained in:
Grégory Soutadé 2017-07-19 19:15:21 +02:00
parent 7162129220
commit 8469c01b13

View File

@ -102,9 +102,9 @@ async function ask_server(form, field, logins, domain, wdomain, mkey, submit)
}
}
crypto_v2_logins_size = key_index;
if (await getPref("crypto_v1_compatible"))
{
crypto_v2_logins_size = key_index;
for(a=0; a<logins.length; a++, key_index++)
{
enc = await generate_request(domain, logins[a], mkey, global_iv, 1);
@ -222,7 +222,7 @@ async function ask_server(form, field, logins, domain, wdomain, mkey, submit)
if (ciphered_password != "")
{
debug("Ciphered password : " + ciphered_password);
if (matched_key >= crypto_v2_logins_size || server_protocol_version < 4)
if (matched_key >= crypto_v2_logins_size)
// Crypto v1
{
clear_password = await decrypt_ecb(mkey, hex2a(ciphered_password));