Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug(CardDav)]: Wrong sync-token returned when limit is set #50086

Open
4 of 8 tasks
hamza221 opened this issue Jan 8, 2025 · 1 comment
Open
4 of 8 tasks

[Bug(CardDav)]: Wrong sync-token returned when limit is set #50086

hamza221 opened this issue Jan 8, 2025 · 1 comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 31-feedback bug feature: carddav Related to CardDAV internals

Comments

@hamza221
Copy link
Contributor

hamza221 commented Jan 8, 2025

⚠️ This issue respects the following points: ⚠️

Bug description

This is a potential bug to be investigated further:

  1. When syncing the sync token is set to the latest sync-token of the address book
    https://github.com/nextcloud/server/blob/master/apps/dav/lib/CardDAV/CardDavBackend.php#L856-L863

  2. But if a limit is applied -> https://github.com/nextcloud/server/blob/master/apps/dav/lib/CardDAV/CardDavBackend.php#L889-L891
    The sync token is not updated to the correct value where the latest change was returned

=> The client would think that it got all the changes when it potentially didn't

Steps to reproduce

N/A 👆

Expected behavior

Sync token reflects the correct sync step

Nextcloud Server version

master

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

@hamza221 hamza221 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: carddav Related to CardDAV internals labels Jan 8, 2025
@tcitworld
Copy link
Member

Indeed.

When truncation occurs, the DAV:sync-token value returned in the response MUST represent the correct state for the partial set of changes returned. That allows the client to use the returned DAV:sync-token to fetch the next set of changes. In this way, the client can effectively "page" through the entire set of changes in a consistent manner.

https://www.rfc-editor.org/rfc/rfc6578#section-3.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 31-feedback bug feature: carddav Related to CardDAV internals
Projects
Status: 📄 To do
Development

No branches or pull requests

3 participants