Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] Check for password before storing hash in session #50507

Merged

Conversation

valorin
Copy link
Contributor

@valorin valorin commented Mar 13, 2024

Fixes #50497

The \Illuminate\Session\Middleware\AuthenticateSession middleware is designed to log out other user sessions when their password has changed.

It shouldn't be used when there is no password on the user record, however it used to fail silently in 10.x and earlier. Since 11.x expects a password, it now fails on apps without a password and this middleware enabled. This checks for a password and if none set, ignores the rest of the checks to prevent errors in a backwards compatible way.

Ideally this middleware shouldn't be enabled on these sites - so the alternative is to instruct devs to disable this middleware on affected apps and document this in the Upgrade guide.

@driesvints driesvints changed the title Check for password before storing hash in session [11.x] Check for password before storing hash in session Mar 13, 2024
@taylorotwell taylorotwell merged commit bf8fe84 into laravel:11.x Mar 13, 2024
30 checks passed
@valorin valorin deleted the authenticate-session-no-password-error branch March 14, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception thrown if Application does not have a password field
3 participants