Registry Mirror
Skip to content

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 18, 2026

Copy link
Copy Markdown

Backport of PR #66625

Tokens with an explicit expiration date are rejected once it has passed,
but invalidateOldTokens() only looks at last_activity, so a permanent
token with an expiry stays in oc_authtoken and in Devices & sessions for
a year. Apps that create short-lived tokens (e.g. Passwords web UI
sessions) pile up hundreds of dead entries.

Delete them in the hourly clean-up once they expired more than
token_auth_expired_token_retention seconds ago (default 7 days). The
grace period keeps the existing behaviour that a client still sending an
expired token is rejected quietly instead of counting as a failed login.
Remote wipe tokens keep their own retention.

Fixes #61833

Signed-off-by: SKroman108 <138336203+SKroman108@users.noreply.github.com>
@backportbot
backportbot Bot requested review from a team as code owners November 18, 2026 20:31
@backportbot backportbot Bot added the 3. to review Waiting for reviews label Nov 18, 2026
@backportbot backportbot Bot added this to the Nextcloud 34.0.7 milestone Nov 18, 2026
@artonge
artonge enabled auto-merge November 20, 2026 10:59
@artonge
artonge merged commit 8447de4 into stable34 Nov 20, 2026
136 of 142 checks passed
@artonge
artonge deleted the backport/66625/stable34 branch November 20, 2026 11:33
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants