From 0ff5c969c3cfbd3ec85164fd98c8d105853a5dd5 Mon Sep 17 00:00:00 2001 From: Todd Martin Date: Thu, 28 Sep 2023 12:37:15 -0400 Subject: [PATCH] Resolved merge conflicts from vault item encryption. --- .../src/vault/popup/components/fido2/fido2.component.ts | 4 ++-- .../src/vault/services/fido2/fido2-authenticator.service.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/browser/src/vault/popup/components/fido2/fido2.component.ts b/apps/browser/src/vault/popup/components/fido2/fido2.component.ts index ed4c81d7e6e..6e8302ae532 100644 --- a/apps/browser/src/vault/popup/components/fido2/fido2.component.ts +++ b/apps/browser/src/vault/popup/components/fido2/fido2.component.ts @@ -86,14 +86,14 @@ export class Fido2Component implements OnInit, OnDestroy { this.ciphers = await Promise.all( message.cipherIds.map(async (cipherId) => { const cipher = await this.cipherService.get(cipherId); - return cipher.decrypt(); + return cipher.decrypt(await this.cipherService.getKeyForCipherKeyDecryption(cipher)); }) ); } else if (message.type === "InformExcludedCredentialRequest") { this.ciphers = await Promise.all( message.existingCipherIds.map(async (cipherId) => { const cipher = await this.cipherService.get(cipherId); - return cipher.decrypt(); + return cipher.decrypt(await this.cipherService.getKeyForCipherKeyDecryption(cipher)); }) ); } diff --git a/libs/common/src/vault/services/fido2/fido2-authenticator.service.ts b/libs/common/src/vault/services/fido2/fido2-authenticator.service.ts index d462fa2f5d2..895e5ba4cef 100644 --- a/libs/common/src/vault/services/fido2/fido2-authenticator.service.ts +++ b/libs/common/src/vault/services/fido2/fido2-authenticator.service.ts @@ -131,7 +131,9 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr keyPair = await createKeyPair(); const encrypted = await this.cipherService.get(cipherId); - cipher = await encrypted.decrypt(); + cipher = await encrypted.decrypt( + await this.cipherService.getKeyForCipherKeyDecryption(encrypted) + ); fido2Key = await createKeyView(params, keyPair.privateKey); cipher.login.fido2Keys = [fido2Key]; const reencrypted = await this.cipherService.encrypt(cipher);