Repository navigation
v4.0.0 — correctness release
A correctness release. Several tools returned confidently wrong answers or accepted input that produced invalid objects on the server. The fixes change behaviour, hence the major version.
Install: npm install dav-mcp@4.0.0
Breaking
update_eventno longer takes dates throughfields.DTSTART,DTENDandDURATIONare rejected there — use the new top-levelstart_date,end_dateandall_dayparameters. The flat map cannot express this property family: an all-day value needs aVALUE=DATEparameter, which the map could only add as a duplicate property, and writingDTENDon an event stored asDTSTART+DURATIONleft both present, which RFC 5545 §3.6.1 forbids.- The
fieldsmap now validates keys and values onupdate_event,update_todoandupdate_contact. Keys must be bare property names, values single-line. - Query tools return at most 20 results by default.
calendar_query,todo_queryandaddressbook_querypreviously returned everything in range. Passlimit(max 500); the response states how many matched in total.
Security
An unvalidated fields map allowed iCalendar/vCard property and component injection. Keys and values reached updatePropertyWithValue unchecked, and that function keys on the property name alone — so a value could terminate the VEVENT and open a second, fully caller-shaped one, a key containing : or a line break injected properties outright, and a VALARM with ACTION:EMAIL and an arbitrary attendee could be attached. Verified by re-parsing the emitted documents. This is reachable through ordinary tool arguments, which matters because the caller is a model that routinely handles untrusted text.
Also: carriage returns survived sanitizeICalString, and create_event / create_contact emitted LF line endings where CRLF is required.
Fixed
- Recurring events showed the series start, not the occurrence in the queried range. "What's on next week" returned each series once, dated at its original start — often years back. Present with a wrong date is worse than absent. Expansion is client-side, so it does not depend on a server implementing
CALDAV:expand, and it also surfacesRECURRENCE-IDoverrides, which were silently dropped. - Times were rendered in the server's timezone, not the event's. A meeting booked for 14:00 Berlin showed as 12:00 on a UTC host; an Exchange-style TZID made the date vanish entirely; date-only values shifted a day east of Greenwich.
- Deletes reported success even when the server refused them.
fetchdoes not reject on 4xx and the Response was discarded, so a 403 looked exactly like a 204. Server-independent, contrary to the original Radicale framing. - Contact photos overflowed the context. One contact with an embedded
PHOTOproduced ~171k characters, 99.9% of it base64 in the raw data block. Against a real address book: 456k characters of raw cards now render in 8.9k. client.fetchTodos is not a function. The tsdav fork's committeddist/had lost the whole VTODO surface to an upstream sync and a git install never rebuilt it, so six of the eight todo tools were dead for npm users while working locally.[object Object]as the collection name, across five call sites plus anullpath.- The tool-call logger and dotenv could corrupt the JSON-RPC stream by writing to stdout under the stdio transport.
- The version reported to clients was a hardcoded
3.0.1in five places, two releases stale.
Added
freebusy_query— "when am I free?", calculated client-side, since the native CalDAVfree-busy-queryREPORT fails on most servers people actually run.- All-day events in
create_eventandupdate_event, in both directions. limiton the query tools, with the result set sorted before truncation so the subset is the earliest rather than arbitrary.
Internal
Tests went from 76 to 240, including the first formatter, handler, protocol and timezone coverage. The suite runs under host timezones from Pacific/Midway to Pacific/Auckland, which is where the date-shifting bugs hid.
Verified against a live Baïkal server before release.