Skip to content

[6.x] Tidy up login credential handling - #15335

Merged
jasonvarga merged 3 commits into
6.xfrom
login-timing
Sep 1, 2026
Merged

[6.x] Tidy up login credential handling#15335
jasonvarga merged 3 commits into
6.xfrom
login-timing

Conversation

@jasonvarga

@jasonvarga jasonvarga commented Sep 1, 2026

Copy link
Copy Markdown
Member

Two small changes to HandlesLogins and the two login controllers:

  • Credential validation is wrapped in a Timebox, so a login attempt takes a consistent amount of time regardless of which branch it takes. This is the same thing Laravel's guard does around attempt(), which these controllers don't go through.
  • The passkey enforcement check moved to after credential validation and before the two-factor branch, and now uses the already-validated user instead of looking it up again.

Covers both the Control Panel and frontend user login.

The check now runs against the already-validated user, before the two-factor branch. A login with the wrong password gets the generic failure rather than the passkey message, and the password is verified first — so it can be rehashed on a login that's then refused, and the attempt counts against the wrong-password throttle.
@jasonvarga
jasonvarga merged commit 877aab6 into 6.x Sep 1, 2026
64 checks passed
@jasonvarga
jasonvarga deleted the login-timing branch September 1, 2026 21:02
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.

1 participant