1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 05:43:41 +00:00

[EC-781] User can bypass master password requirements policy by canceling password reset and pasting invite link (#4218)

* [EC-781] Forcing the user to login to evaluate if the user's password meets the Organization password policy requirements

* [EC-781] Fix bug preventing from submitting update password form

* Revert "[EC-781] Forcing the user to login to evaluate if the user's password meets the Organization password policy requirements"

This reverts commit f09d74b4fc.

* [EC-781] Get email value from query parameters also for authenticated requests

* [EC-781] Forcing the user to login to evaluate if the user's current password meets the Organization password policy requirements

* [EC-781] Logging out the user using messagingService on accept-organization component

* [EC-781] Refactored accept-organization component to be simpler to read
This commit is contained in:
Rui Tomé
2022-12-29 16:20:19 +00:00
committed by GitHub
parent 2ac8e27b31
commit bf67493663
5 changed files with 31 additions and 15 deletions

View File

@@ -112,7 +112,7 @@ export class AppComponent implements OnDestroy, OnInit {
this.router.navigate(["/"]);
break;
case "logout":
this.logOut(!!message.expired);
this.logOut(!!message.expired, message.redirect);
break;
case "lockVault":
await this.vaultTimeoutService.lock();
@@ -220,7 +220,7 @@ export class AppComponent implements OnDestroy, OnInit {
this.destroy$.complete();
}
private async logOut(expired: boolean) {
private async logOut(expired: boolean, redirect = true) {
await this.eventUploadService.uploadEvents();
const userId = await this.stateService.getUserId();
await Promise.all([
@@ -247,7 +247,9 @@ export class AppComponent implements OnDestroy, OnInit {
await this.stateService.clean({ userId: userId });
Swal.close();
this.router.navigate(["/"]);
if (redirect) {
this.router.navigate(["/"]);
}
});
}