Skip to content

Conversation

@shaunwarman
Copy link
Contributor

…one-match and incomplete vcard

Fix Critical CardDAV Bugs and Add RFC Compliance

Fixes

  1. PROPPATCH Support - Implemented missing PROPPATCH method for updating address book properties (displayname, description, color)
  2. vCard Validation - Added RFC 6350 compliance checks: validates VERSION, FN, BEGIN/END markers, and 1MB size limit
  3. If-None-Match Header - Added support for If-None-Match: * to prevent accidental overwrites (RFC 2616)
  4. Sync-Collection - Fixed incremental sync to return only modified contacts instead of all contacts using updated_at timestamps
  5. URL Consistency - Fixed username/email inconsistency in address book URL generation

Changes

  • routes/carddav/index.js - PROPPATCH handler, If-None-Match check, sync-collection timestamp filtering
  • helpers/carddav-xml.js - New validateVCard() function with RFC 6350 validation
  • helpers/ensure-default-address-book.js - Fixed URL to use username instead of email

Tests Added

  • 7 new tests covering vCard validation, If-None-Match, PROPPATCH, and sync-collection

All changes maintain backward compatibility and improve RFC 6352/6350 compliance.

@titanism titanism merged commit f968ed6 into master Oct 21, 2025
3 of 5 checks passed
@titanism titanism deleted the fix/carddav-improvements branch October 21, 2025 03:32
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.

3 participants