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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user