1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

[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

View File

@@ -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"),