Repository navigation
[stable33] fix(session): Keep remembered logins across the session timeout - #67165
Merged
Merged
Conversation
A session that was idle for longer than session_lifetime is ended with a full logout, which also deletes the remember-me cookies. The user is logged out for good, although they asked to stay logged in and the documentation of session_lifetime says a remembered login is transparently re-authenticated after the session expired. When the request carries remember-me cookies, endInactiveSession() now only drops the session data and keeps the cookies. The remember-me login then signs the user in again and replaces the remember-me token, as it does whenever the session is gone. Any other session is still ended with a logout. As this needs no database, it also applies in maintenance mode and with a pending upgrade, and the login continues once the instance is available again. The remember-me login is now only attempted with cookies that are strings, as loginWithCookie() requires. Unlocking a password-protected share only re-issues remember-me cookies that are strings. Clients can send the cookies as arrays, which ended in a TypeError. Assisted-by: ClaudeCode:claude-opus-5 Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
DerDreschner
requested review from
Altahrim,
leftybournes,
marcoambrosini and
pringelmann
and removed request for
a team
November 29, 2026 21:46
DerDreschner
enabled auto-merge
November 29, 2026 21:47
artonge
approved these changes
Nov 30, 2026
cristianscheid
approved these changes
Nov 30, 2026
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.
Backport of PR #65959
AI (if applicable)