fix: list contacts on servers that reject a bare prop-filter - #3
Open
janbaer wants to merge 2 commits into
Open
Conversation
fetchVCards discovers the card hrefs with an addressbook-query whose default filter is a condition-less <prop-filter name="FN"/>. RFC 6352 reads that as "every card carrying an FN property", but Open-Xchange answers it with an empty result. The collection then looks empty, the multi-get stage never runs, and list-contacts reports zero contacts for a populated address book. mailbox.org is one affected host. Discover the hrefs with a PROPFIND and hand them to fetchVCards as objectUrls, which routes the fetch through addressbook-multiget and skips the filter entirely. PROPFIND is mandatory for a CardDAV collection, so this works everywhere; resolve-contact already takes the same objectUrls path, which is why get-contact kept working while list-contacts did not.
janbaer
marked this pull request as draft
August 16, 2026 15:39
PROPFIND returns the collection itself alongside its members, and that entry was recognised by comparing paths for exact equality. Servers differ on whether they put a trailing slash there, and it need not match the one the caller passed in, so the collection could survive into the href list and be requested as if it were a card. Harmless downstream, since a response without vCard data is filtered out anyway, but it defeats the empty-collection short circuit and it is the same trailing-slash fragility that hrefFor already guards against elsewhere in this repo.
Author
|
Pushed one follow-up: the self-filter compared paths for exact equality, so a collection whose own href carries a trailing slash the caller did not pass would survive into the href list and be requested as if it were a card. Harmless downstream, since a response without vCard data is filtered out anyway, but it defeats the empty-collection short circuit and it is the same trailing-slash fragility |
janbaer
marked this pull request as ready for review
August 16, 2026 15:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
list-contactsreturns an empty array against Open-Xchange (mailbox.org), even though the address book holds contacts andlist-address-booksworks.fetchVCardsdiscovers the card hrefs with anaddressbook-querywhose default filter is a condition-less<prop-filter name="FN"/>. Sending the same REPORT by hand against a book holding 24 cards:<prop-filter name="FN"/><prop-filter name="FN">+<text-match><filter/>RFC 6352 reads a bare prop-filter as "every card carrying that property", so this looks like a server bug, but it is one that any tsdav-based client walks into. The href list comes back empty, the multi-get stage never runs, and the tool reports zero contacts.
This discovers the hrefs with a PROPFIND and hands them to
fetchVCardsasobjectUrls, which takes theaddressbook-multigetpath and skips the filter.resolve-contactalready does exactly this, which is whyget-contactworked whilelist-contactsdid not.Verified against mailbox.org. Four unit tests added, full suite green.
One aside: this repository's default branch on GitHub is
claude/beautiful-carson-4lqy46, one commit ahead ofmain, so I based the PR there. Let me know if you would rather have it onmain.