From ba7d6b437f2e03a9e2bb46dcda846cee1f816ce1 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 3 Nov 2016 16:06:57 -0700 Subject: Fix password validation and persistence issue Was wiping the vault on each successful password attempt... :P --- app/scripts/lib/encryptor.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/scripts/lib/encryptor.js') diff --git a/app/scripts/lib/encryptor.js b/app/scripts/lib/encryptor.js index 832e6d528..fe83b86dd 100644 --- a/app/scripts/lib/encryptor.js +++ b/app/scripts/lib/encryptor.js @@ -69,6 +69,9 @@ function decryptWithKey (key, text) { const decryptedObj = JSON.parse(decryptedStr) return decryptedObj }) + .catch(function(reason) { + throw new Error('Incorrect password') + }) } function convertStringToArrayBufferView (str) { -- cgit v1.2.3