Repository navigation
[12.x] Ensure password hash matches stored cookie before authenticating the user - #61386
Merged
Merged
Conversation
the user Signed-off-by: Mior Muhammad Zaki <[email protected]>
crynobone
marked this pull request as ready for review
September 1, 2026 05:09
Signed-off-by: Mior Muhammad Zaki <[email protected]>
shaedrich
reviewed
Sep 1, 2026
binaryfire
added a commit
to hypervel/components-backup
that referenced
this pull request
Oct 1, 2026
Port Laravel framework #61386 and its pinned missing-user follow-up. A remember-token match must also match the current password HMAC before the guard restores the session or emits a login event. Derive viaRemember from the validated user so rejected cookies cannot report successful remembered authentication. Retain the HMAC-only policy and nullable-password support. The check uses the existing request-local state, adds no database lookup, and runs only after a remember-cookie candidate is found. Preserve ordinary session-ID and cached-user paths. Adapt the existing success test, cover missing users and stale or legacy cookie hashes, and clarify password-hash and application-key invalidation in the authentication and encryption documentation. Validated with AuthGuardTest, Auth/Session/Sanctum ParaTest suites, SQLite user-session lifecycle and logout-rehash integration tests, scoped formatting, full source/type PHPStan, and diff checks. Upstream: laravel/framework#61386 Source: 01d008c9b5f32cb7c5e50a9a22273113d810b2a2 Follow-up: 3005430f720b659846b72ec2e8c8446945ca9472
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.