From 8469c01b132d8c9a67ff4494e532a411a7c581d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Wed, 19 Jul 2017 19:15:21 +0200 Subject: [PATCH] Fix minor error : crypto_v2_logins_size must be always updated --- chrome_addon/lib/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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));