fix(auth): check reset link expiry against interactive login timestamp - #64126
Open
silverkszlo wants to merge 1 commit into
Open
fix(auth): check reset link expiry against interactive login timestamp#64126silverkszlo wants to merge 1 commit into
silverkszlo wants to merge 1 commit into
Conversation
Signed-off-by: silver <s.szmajduch@posteo.de> Assisted-by: ClaudeCode:claude-fable-5
silverkszlo
requested review from
Altahrim,
blizzz,
leftybournes,
provokateurin and
salmart-dev
and removed request for
a team
September 8, 2026 15:11
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.
Summary
The bug
When the password of a user expires and they want to reset it while they have an open session somewhere, the "Forgot password" flow sends them into a loop and never allows them to reset their password: logging in is being refused because the password expired, and the emailed reset link is being refused as expired as well.
How to reproduce
occ user:setting \ blume password_policy pwd_last_updated $(( $(date +%s) - 10*86400 ))This solution
VerificationTokencompared the reset link's creation time againstIUser::getLastLogin(). Despite its name that value is a "last seen" timestamp.Session::validateSession()refreshes it on every request of an already authenticated session, so it kept moving past the reset link's creation time while the user did nothing but leave a session open.This PR records the time of an actual authentication separately (
lastInteractiveLogin) and compares against that instead.IUser::getLastLogin()keeps its current meaning, so the administration user list and inactive-account handling are unaffected.Checklist
3. to review, feature component)stable32)AI (if applicable)