1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

[PM-21586] Return null in decryptUserKeyWithMasterKey if decrypt fails (#14756)

* Return null in decryptUserKeyWithMasterKey if decrypt fails

* Show error on invalid master password

* Add logs
This commit is contained in:
Bernd Schoolmann
2025-05-13 15:42:48 +02:00
committed by GitHub
parent b2c118d607
commit 00beef617c
3 changed files with 26 additions and 7 deletions

View File

@@ -556,6 +556,15 @@ export class LockComponent implements OnInit, OnDestroy {
masterPasswordVerificationResponse!.masterKey,
this.activeAccount.id,
);
if (userKey == null) {
this.toastService.showToast({
variant: "error",
title: this.i18nService.t("errorOccurred"),
message: this.i18nService.t("invalidMasterPassword"),
});
return;
}
await this.setUserKeyAndContinue(userKey, true);
}