You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
One object that does not parse makes a post-filtered search() raise for the whole calendar #815
Disclaimer: AI-generated text below the line, generated by Claude Opus 5.5.
Found while working on PyCalendar/calendaring#13
When Calendar.search() filters the results on the client side, one stored object that icalendar cannot parse makes the whole search raise a plain ValueError. None of the other objects come back.
_filter_search_results() (caldav/search.py, around line 80) calls searcher.check_component(o, ...), and on ValueError falls back to o.icalendar_instance.subcomponents. That parses the same data again, so it raises again:
The post-filter is on by default in many cases (search.py, "Setting default value for post_filter"). Among them: a time range that caldav widened itself, todo=True without include_completed, and any server without search.text.case-sensitive (per the hints: Radicale, SOGo, CCS, Stalwart), where it is on for every search. get_object_by_uid() always post-filters. So on those servers, one malformed object written by some other client makes every search in that calendar fail.
Reproduction against caldav 3.6.0, without a server:
(DUE:2026-10-20 is not a valid DATE value; such data is out there.)
Possible fix: skip an object that does not parse, with a log warning, or collect such objects and hand them back to the caller, instead of letting the exception escape. Skipping silently would hide data, so some way for the caller to learn about the skipped objects would be better.
Activity
fix: CalDAV backend on the BrokenObject primitives
Merge PR 13: Roadmap 2.1: the CalDAV backend