From 0bd169cbf5a0bfab961cf7c6afdfd15a684eaabb Mon Sep 17 00:00:00 2001 From: brantje Date: Mon, 19 Dec 2016 23:58:24 +0100 Subject: [PATCH] Ignore failed passwords --- js/app/controllers/settings.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/js/app/controllers/settings.js b/js/app/controllers/settings.js index f1a8c6b6..a51d07c4 100644 --- a/js/app/controllers/settings.js +++ b/js/app/controllers/settings.js @@ -155,17 +155,21 @@ for (var i = 0; i < vault.credentials.length; i++) { var c = angular.copy(vault.credentials[i]); if (c.password && c.hidden === 0) { - c = CredentialService.decryptCredential(c); - if (c.password) { - var zxcvbn_result = zxcvbn(c.password); - if (zxcvbn_result.score <= minStrength) { - results.push({ - credential_id: c.credential_id, - label: c.label, - password: c.password, - password_zxcvbn_result: zxcvbn_result - }); + try { + c = CredentialService.decryptCredential(c); + if (c.password) { + var zxcvbn_result = zxcvbn(c.password); + if (zxcvbn_result.score <= minStrength) { + results.push({ + credential_id: c.credential_id, + label: c.label, + password: c.password, + password_zxcvbn_result: zxcvbn_result + }); + } } + } catch (e){ + console.warn(e); } }