From 30d8168c2e5c96739a4c02fa7dc7306911198d32 Mon Sep 17 00:00:00 2001 From: Robyn MacCallum Date: Mon, 11 Sep 2023 10:40:50 -0400 Subject: [PATCH] [PM-3600] Try to get key in master password reprompt check (#6087) * Add check to hasMasterPasswordAndMasterKeyHash to make sure getMasterKey() has a value * Try getting or deriving the key on password reprompt --- .../src/vault/components/password-reprompt.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/angular/src/vault/components/password-reprompt.component.ts b/libs/angular/src/vault/components/password-reprompt.component.ts index 0f0fd685b2..1094b37931 100644 --- a/libs/angular/src/vault/components/password-reprompt.component.ts +++ b/libs/angular/src/vault/components/password-reprompt.component.ts @@ -27,7 +27,8 @@ export class PasswordRepromptComponent { } async submit() { - if (!(await this.cryptoService.compareAndUpdateKeyHash(this.masterPassword, null))) { + const storedMasterKey = await this.cryptoService.getOrDeriveMasterKey(this.masterPassword); + if (!(await this.cryptoService.compareAndUpdateKeyHash(this.masterPassword, storedMasterKey))) { this.platformUtilsService.showToast( "error", this.i18nService.t("errorOccurred"),