1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 22:03:36 +00:00

fix(auth-guard): [PM-22822] fix infinite redirect loop (#15371)

This commit is contained in:
rr-bw
2025-06-27 11:19:13 -07:00
committed by GitHub
parent 64f8073fdf
commit 7500fe32bb

View File

@@ -100,10 +100,10 @@ export const authGuard: CanActivateFn = async (
// Post- Account Recovery or Weak Password on login // Post- Account Recovery or Weak Password on login
if ( if (
forceSetPasswordReason === ForceSetPasswordReason.AdminForcePasswordReset || (forceSetPasswordReason === ForceSetPasswordReason.AdminForcePasswordReset ||
(forceSetPasswordReason === ForceSetPasswordReason.WeakMasterPassword && forceSetPasswordReason === ForceSetPasswordReason.WeakMasterPassword) &&
!routerState.url.includes("update-temp-password") && !routerState.url.includes("update-temp-password") &&
!routerState.url.includes("change-password")) !routerState.url.includes("change-password")
) { ) {
const route = isChangePasswordFlagOn ? "/change-password" : "/update-temp-password"; const route = isChangePasswordFlagOn ? "/change-password" : "/update-temp-password";
return router.createUrlTree([route]); return router.createUrlTree([route]);