From 7f9f6d3d0e19e0bf5be1fb9364cf4e67b56a69f6 Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Thu, 13 May 2021 11:22:26 +1000 Subject: [PATCH] Check encKey when importing encrypted JSON (#968) * Check encKey when importing encrypted JSON * bump jslib --- jslib | 2 +- src/app/services/services.module.ts | 4 ++-- src/locales/en/messages.json | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/jslib b/jslib index 1e2c56cacf..306aef73d4 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 1e2c56cacf975eab4527cb3c1a63cf8136b58bd4 +Subproject commit 306aef73d459dfad8a7a06c32442c9ed2d56922e diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index 2b59c700bb..65fe1fb8c2 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -129,9 +129,9 @@ const containerService = new ContainerService(cryptoService); const authService = new AuthService(cryptoService, apiService, userService, tokenService, appIdService, i18nService, platformUtilsService, messagingService, vaultTimeoutService, consoleLogService); -const exportService = new ExportService(folderService, cipherService, apiService); +const exportService = new ExportService(folderService, cipherService, apiService, cryptoService); const importService = new ImportService(cipherService, folderService, apiService, i18nService, collectionService, - platformUtilsService); + platformUtilsService, cryptoService); const notificationsService = new NotificationsService(userService, syncService, appIdService, apiService, vaultTimeoutService, async () => messagingService.send('logout', { expired: true }), consoleLogService); const environmentService = new EnvironmentService(apiService, storageService, notificationsService); diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 3b632cd686..719199fa1e 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -1036,6 +1036,9 @@ "importNothingError": { "message": "Nothing was imported." }, + "importEncKeyError": { + "message": "Error decrypting the exported file. Your encryption key does not match the encryption key used export the data." + }, "selectFormat": { "message": "Select the format of the import file" },