Repository navigation
CardDAV: an addressbook-query without <C:filter> matches every object - #33
Merged
Merged
Conversation
Found in production: opencloud-contacts lists the address book with a REPORT addressbook-query that has no <C:filter> element (just getetag + address-data), the RFC 6352 give-me-everything form. go-webdav v0.7's carddav.Match falls through its empty prop-filters loop to 'return false, nil', so every object was discarded and the multistatus came back empty. Writes worked fine; the list was what came back empty, which read as 'contacts are not saved'. QueryAddressObjects now handles the filterless query itself (every object matches, result limit respected) and keeps delegating filtered queries to the library's Match, where a match error skips the object instead of failing the whole report. The regression test drives the exact report the extension sends: two stored cards come back with their address-data, and a filtered query still returns only the matching card. Closes #32
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.
Closes #32.
Found in production: opencloud-contacts lists the address book with a REPORT addressbook-query that has no
<C:filter>element (just getetag + address-data), the RFC 6352 give-me-everything form. go-webdav v0.7's carddav.Match falls through its empty prop-filters loop toreturn false, nil, so every object was discarded and the multistatus came back empty. Writes worked fine; the list was what came back empty, which read as 'contacts are not saved'.QueryAddressObjects now handles the filterless query itself (every object matches, limit respected) and keeps delegating filtered queries to the library's Match, where a match error skips the object instead of failing the whole report.
Regression test drives the exact report the extension sends (two cards back with address-data; filtered query returns only the match). 38 tests green.