[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
This commit is contained in:
Robyn MacCallum 2023-09-11 10:40:50 -04:00 committed by GitHub
parent 93c11a7dab
commit 30d8168c2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,8 @@ export class PasswordRepromptComponent {
} }
async submit() { 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( this.platformUtilsService.showToast(
"error", "error",
this.i18nService.t("errorOccurred"), this.i18nService.t("errorOccurred"),