You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix forced password change not redirecting on MVC pages (#8101)
## Problem
When a user had (first login after setup), the MVC (legacy) pages would
not redirect to the password change form. The user could bypass the
forced password change by directly accessing any MVC page, allowing them
to continue with a password that must be changed.
## Root Cause
The authentication check in `AuthMiddleware` only called
`ensureAuthentication()` (which checks and calls `header()` redirects)
when the user was **not** authenticated. For authenticated users with an
active session, it did nothing, meaning any required redirect steps
(like forced password change) were skipped.
## Solution
### 1. AuthMiddleware Enhancement
([AuthMiddleware.php](src/ChurchCRM/Slim/Middleware/AuthMiddleware.php#L51-L57))
- For authenticated browser requests (not background/API), call
`validateUserSessionIsActive(true)` to check for required redirect steps
- Use PSR-15 response redirect (302 to `nextSte
When a user had (first login after setup), the MVC (lenon
## Root Cause
The authentication check in `AuthMiddleware` only called
`ensureAuthentication()` (which checks and calls `header()` redirects)
when the user was **not** authenticated. For authenticated users with an
active session, it did nothing, meaning any required redirect sted
0 commit comments