From 38883b95503bd35cc752b8e22ca0e909495c27bb Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 13 Jul 2017 11:22:16 -0400 Subject: [PATCH] add totp to import/export --- src/app/services/cryptoService.js | 4 ++++ src/app/services/importService.js | 1 + src/app/tools/toolsExportController.js | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/services/cryptoService.js b/src/app/services/cryptoService.js index 345ec104db..9960fb272f 100644 --- a/src/app/services/cryptoService.js +++ b/src/app/services/cryptoService.js @@ -600,6 +600,10 @@ angular throw 'Encryption key unavailable.'; } + if (encType !== key.encType) { + throw 'encType unavailable.'; + } + var keyBuf = key.getBuffers(), encKey = null; diff --git a/src/app/services/importService.js b/src/app/services/importService.js index acf383928f..3c18b25206 100644 --- a/src/app/services/importService.js +++ b/src/app/services/importService.js @@ -249,6 +249,7 @@ password: value.password && value.password !== '' ? value.password : null, notes: value.notes && value.notes !== '' ? value.notes : null, name: value.name && value.name !== '' ? value.name : '--', + totp: value.totp && value.totp !== '' ? value.totp : null }); if (addFolder) { diff --git a/src/app/tools/toolsExportController.js b/src/app/tools/toolsExportController.js index 52e5d4c96a..69242c97a1 100644 --- a/src/app/tools/toolsExportController.js +++ b/src/app/tools/toolsExportController.js @@ -40,7 +40,8 @@ notes: decLogins[i].notes, folder: decLogins[i].folderId && (decLogins[i].folderId in foldersDict) ? foldersDict[decLogins[i].folderId].name : null, - favorite: decLogins[i].favorite ? 1 : null + favorite: decLogins[i].favorite ? 1 : null, + totp: decLogins[i].totp }; exportLogins.push(login);