Conversation
The remember-me cookie outlives the session token it refers to in two cases, and cookie login then fails on every request. A session token created as DO_NOT_REMEMBER (user_oidc, Apache login) is removed by the cleanup job after session_lifetime, while the cookies last remember_login_cookie_lifetime. createRememberMeToken() now marks the current session token as remembered. ISession::regenerateId(true, true) moves the token to the new session id but left nc_session_id pointing at the old one (password protected share unlock, Talk password rooms). The cookie is now rewritten with the new id. Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
solracsf
requested review from
Altahrim,
come-nc,
icewind1991 and
provokateurin
and removed request for
a team
September 19, 2026 18:24
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
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
A stale remember-me cookie logs "Could not find the session token to renew" on every request, so affected instances end up with thousands of these. The cookie points at a session token that no longer exists. This fixes two ways that happens:
user_oidcandOC_User::loginWithApache()create the session token as "do not remember" but then set the 15 day remember-me cookies. The cleanup job deletes such tokens aftersession_lifetime(24h by default), so anyone away for a day hits the loop when they come back.createRememberMeToken()now marks the session token as remembered, which also coversuser_oidcwithout a change there.regenerateId(true, true)(password protected share unlock, Talk password rooms) moves the token to the new session id but never updatednc_session_id. The cookie is now rewritten to the new id.What is not covered: a token that is revoked or logged out via IdP backchannel logout after the browser session already expired still leaves the cookies behind, and each request will still log the error. Tokens that are already orphaned are not repaired, those users have to log in once more.
Checklist
3. to review, feature component)stable32)AI (if applicable)