Skip to content

Fix duplicate RRULE scrubbing for CalDAV objects#385

Open
kvdb wants to merge 2 commits into
Alinto:masterfrom
kvdb:fix/duplicate-rrule-scrubbing
Open

Fix duplicate RRULE scrubbing for CalDAV objects#385
kvdb wants to merge 2 commits into
Alinto:masterfrom
kvdb:fix/duplicate-rrule-scrubbing

Conversation

@kvdb

@kvdb kvdb commented May 6, 2026

Copy link
Copy Markdown

Problem

Malformed or re-uploaded calendar objects can contain repeated identical RRULE properties. SOGo currently stores and returns those duplicates, which can make Android/Etar import them as one concatenated recurrence rule and fail while parsing the event.

Summary

  • remove exact duplicate RRULE properties before returning CalDAV calendar data
  • scrub exact duplicate RRULE properties before saving calendar components
  • preserve different RRULE properties by comparing serialized rule content instead of iCalRecurrenceRule equality

@kvdb kvdb marked this pull request as ready for review May 6, 2026 19:36
@kvdb kvdb force-pushed the fix/duplicate-rrule-scrubbing branch from dd3acc0 to 480578c Compare May 6, 2026 19:56
Some clients can leave VEVENTs with repeated identical RRULE properties. SOGo
returned those duplicates unchanged through CalDAV, which can make Android/Etar
parse a concatenated rule and crash.

Remove exact serialized duplicate RRULE children before serializing calendar data,
while preserving different recurrence rules. Skip the parser fast path unless the
stored content contains at least two RRULE markers.
@kvdb kvdb force-pushed the fix/duplicate-rrule-scrubbing branch from 480578c to bac4c49 Compare May 6, 2026 20:04
Malformed CalDAV clients can PUT calendar objects with repeated identical RRULE
properties. If SOGo stores them as-is, later syncs keep redistributing bad
data.

Drop exact duplicate RRULEs after request-calendar adjustments and before
scheduling/change handling, with the final save path as a persistence backstop.
@kvdb kvdb force-pushed the fix/duplicate-rrule-scrubbing branch from bac4c49 to 2f76171 Compare May 6, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant