Bug 300915

Summary: REPORT request sent contains no filter
Product: [Frameworks and Libraries] Akonadi Reporter: Ingo Ratsdorf <ingo>
Component: DAV ResourceAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: critical CC: greg
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ingo Ratsdorf 2012-05-31 09:02:03 UTC
The groupdav resource issues a REPORT query on CardDAV that does not contain a filter element:

1074	74.868876	192.168.1.67	192.168.1.70	HTTP/XML	302	REPORT /addressbooks/c9c6be80dbe8be333971617d87de7669e19443c0/24/ HTTP/1.1
<?xml version="1.0" encoding="utf-8"?>
<addressbook-query xmlns="urn:ietf:params:xml:ns:carddav">
<prop xmlns="DAV:">
<displayname xmlns="DAV:"/>
<resourcetype xmlns="DAV:"/>
<getetag xmlns="DAV:"/>
</prop>
</addressbook-query>

SabreDAV replies with 400 BAD EQUEST
 
1078	75.213334	192.168.1.70	192.168.1.67	HTTP/XML	865	HTTP/1.1 400 Bad request
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre_DAV_Exception_BadRequest</s:exception>
<s:message>Only one filter element is allowed</s:message>
<s:sabredav-version>1.5.4</s:sabredav-version>
</d:error>

Reproducible: Always

Steps to Reproduce:
Query Items in Akonadi
Actual Results:  
Receive 400 BAD REQUEST from Server

Expected Results:  
Retrieved VCards

According to CardDAV RFC, a filter MUST be specified as part of the query:
(http://tools.ietf.org/html/rfc6352#section-10.3)

10.3. CARDDAV:addressbook-query XML Element
   Name:  addressbook-query
   Namespace:  urn:ietf:params:xml:ns:carddav
   Purpose:  Defines a report for querying address book data
   Description:  See Section 8.6.
   Definition:
       <!ELEMENT addressbook-query ((DAV:allprop |
                                     DAV:propname |
                                     DAV:prop)?, filter, limit?)>

Please note that "filter" and "limit" are NOT optional.
Comment 1 Grégory Oestreicher 2012-05-31 09:21:49 UTC

*** This bug has been marked as a duplicate of bug 300047 ***