View Issue Details

IDProjectCategoryView StatusLast Update
0003829SOGoBackend Calendarpublic2016-10-05 10:48
ReporterJames Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platform[Server] LinuxOSUbuntuOS Version14.04 LTS
Product Version2.3.15 
Summary0003829: SOGO CalDav backend returns incorrect initial sync token when last modification on within calendar was a delete action
Description

Using z-push as the client, if my last action in a calendar is to delete an appointment, and then I request an initial sync token via the REPORT method, I will receive an initial sync token which does not include the most recent delete actions.

This appears to be because when records are requested without a sync token, deleted items are ignored (so as not to return already deleted appointments), but this has the flow-on effect of causing a subsequent sync REPORT request to return appointments that were deleted before the original sync token was provided to the client.

Steps To Reproduce
  1. Delete an appointment from the calendar; do not make any other changes to any other appointments.

  2. Request an initial sync REPORT for the calendar from SOGO; ie:
    <D:sync-collection xmlns:D="DAV:">
    <D:sync-token></D:sync-token>
    <D:sync-level>1</D:sync-level>
    <D:prop>
    <D:getetag/>
    </D:prop>
    </D:sync-collection>

    (SOGO will provide a sync-token using the epoch of the last-modified, non-deleted appointment)

  3. Request a second sync REPORT using the previously supplied sync-token.

    (SOGO will provide a new sync-token using the epoch of the last-modified appointment, which is the appointment deleted previously, as well as a 404 Not Found status for the deleted appointment).

Expected result is that the initial sync token would include the latest deleted appointment, and subsequent sync REPORTS would reissue the initial sync token (assuming no further changes to the calendar).

Additional Information

While I'm very green on objective C, it appears as though:

  1. the list of appointments from which the initial sync token is obtained is SOGoGCSFolder - syncTokenFieldsWithProperties; where ...
    records = [self _fetchFields: fields
    withQualifier: qualifier
    ignoreDeleted: YES];

  2. _appendComponentProperties then collects the largest c_lastmodified value and sets newToken.

Because the initial list of records ignores deletions, the initial sync token will not include any deletes if the last change(s) to the calendar are deletion(s).

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2016-10-05 10:48 James New Issue