Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

[stable34] fix(session): Keep remembered logins across the session timeout - #67164

Merged
DerDreschner merged 1 commit into
stable34from
backport/65959/stable34
Nov 30, 2026
Merged

DerDreschner merged 1 commit into
stable34from
backport/65959/stable34

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, CarlSchwan and artonge 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 34.0.7 milestone Nov 29, 2026
@DerDreschner
DerDreschner merged commit c17aaf5 into stable34 Nov 30, 2026
140 of 148 checks passed
@DerDreschner
DerDreschner deleted the backport/65959/stable34 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