Skip to content

fix(SyncFederationAddressBooks): Reject old tokens to make clients sync from scratch - #64979

Open
marcelklehr wants to merge 1 commit into
masterfrom
fix/dav-sync-token-pruning
Open

marcelklehr wants to merge 1 commit into
masterfrom
fix/dav-sync-token-pruning

Conversation

@marcelklehr

Copy link
Copy Markdown
Member
  • resolves: Customer ticket

Summary

  1. Tokens on the remote side are deleted if they are older than syncTokensRetentionDays (default 60 days (!) ).
  2. The sync kept timing out (30s default). The callers only save the token after the whole loop finishes, so every failed run started again from the same old token.
  3. After 60 days, the remote pruned the change history after that token.
  4. A later run succeeded and got only the remaining recent changes, plus the current token.
  5. Result: status OK, 255 cards, and every later delta builds on that incomplete state.

The WebDAV spec requires that the remote server rejects old tokens, but the implementation in nextcloud currently doesn't do this. This PR fixes the implementation to reject old tokens so the client starts a full sync.

Checklist

AI (if applicable)

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

…nc from scratch

Assisted-by: ClaudeCode:claude-opus-5.5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr added this to the Nextcloud 36 milestone Oct 1, 2026
@marcelklehr marcelklehr added the 3. to review Waiting for reviews label Oct 1, 2026
@marcelklehr
marcelklehr requested review from icewind1991, leftybournes, provokateurin and salmart-dev and removed request for a team October 1, 2026 08:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants