Skip to content

[stable33] fix(session): Keep remembered logins across the session timeout - #67165

Merged
DerDreschner merged 1 commit into
stable33from
backport/65959/stable33
Nov 30, 2026
Merged

DerDreschner merged 1 commit into
stable33from
backport/65959/stable33

Conversation

@DerDreschner

Copy link
Copy Markdown
Member

Backport of PR #65959

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

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
DerDreschner requested review from a team as code owners November 29, 2026 21:46
@DerDreschner
DerDreschner requested review from Altahrim, leftybournes, marcoambrosini and pringelmann and removed request for a team November 29, 2026 21:46
@DerDreschner DerDreschner self-assigned this Nov 29, 2026
@DerDreschner DerDreschner added this to the Nextcloud 33.0.12 milestone Nov 29, 2026
@DerDreschner
DerDreschner requested a review from come-nc November 29, 2026 21:49
@DerDreschner
DerDreschner merged commit dd6843d into stable33 Nov 30, 2026
168 of 176 checks passed
@DerDreschner
DerDreschner deleted the backport/65959/stable33 branch November 30, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants