diff --git a/chrome_addon/lib/main.js b/chrome_addon/lib/main.js index 37ac8de..ad25fa4 100644 --- a/chrome_addon/lib/main.js +++ b/chrome_addon/lib/main.js @@ -20,7 +20,7 @@ var DEBUG = false; var protocol_version = 4; var account_url = null; -var crypto_v2_logins_size=0; +var crypto_v2_logins_size = 0; SERVER = {OK : 0, FAILED : 1, RESTART_REQUEST : 2}; @@ -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= 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));