Test 1+2: Query an addressbook for vcards where the EMAIL property EQUALS as search value.
Expected result: Only contacts with an EMAIL property containing the exact search value are returned.
Actual result: SOGo returns an empty result.
- Test 1: Search cards with EMAIL=johndoe@example.com. The card with
UID=sabre-vobject-04122e61-c800-4099-b0e9-6cf91b96f985 should have been returned.
- Test 2: Search cards with EMAIL=johNDOE@EXAmple.com to check that match is case-insensitive
Test 3: Query an addressbook for vcards where an EMAIL property belonging to a specific group EQUALS a search value.
Expected result: Only contacts with a SEARCHGROUP.EMAIL property containing the exact search value are returned.
Actual result: SOGo returns all cards of the addressbook.
RFC6352 references:
- 8.3: Collations supported by the server MUST support "equality" and "substring" match operations as per [RFC4790],
Section 4.2, including the "prefix" and "suffix" options for "substring" matching.
- 8.3: CardDAV servers are REQUIRED to support the "i;ascii-casemap" [RFC4790] and "i;unicode-casemap" [RFC5051]
collations
- 10.5.1 (prop-filter XML element): When the "name" attribute does not specify a group prefix, it MUST match properties
in the vCard data without a group prefix or with any group prefix. When the "name" attribute includes a group
prefix, it MUST match properties that have exactly the same group prefix and name.
=== TEST 1: Search cards with EMAIL=johndoe@example.com ===
[2024-03-31 08:38:28]: [2 NFO] "REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1" 207
>>>>>>>>
REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1
Content-Length: 513
User-Agent: GuzzleHttp/7
Host: etain.mike2k.de
Depth: 1
Content-Type: application/xml; charset=UTF-8
johndoe@example.com
<<<<<<<<
HTTP/1.1 207 Multi-Status
Server: nginx
Date: Sun, 31 Mar 2024 08:38:28 GMT
Content-Type: text/xml; charset=utf-8
Content-Length: 127
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
X-Frame-Options: SAMEORIGIN
--------
NULL
=== TEST 2: Search cards with EMAIL=johNDOE@EXAmple.com (check case-insensitive match) ===
[2024-03-31 08:38:28]: [2 NFO] "REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1" 207
>>>>>>>>
REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1
Content-Length: 513
User-Agent: GuzzleHttp/7
Host: etain.mike2k.de
Depth: 1
Content-Type: application/xml; charset=UTF-8
johNDOE@EXAmple.com
<<<<<<<<
HTTP/1.1 207 Multi-Status
Server: nginx
Date: Sun, 31 Mar 2024 08:38:28 GMT
Content-Type: text/xml; charset=utf-8
Content-Length: 127
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
X-Frame-Options: SAMEORIGIN
--------
NULL
=== TEST 3: Search cards where item1.EMAIL=foo@ex.com ===
[2024-03-31 08:38:28]: [2 NFO] "REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1" 207
>>>>>>>>
REPORT /SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/ HTTP/1.1
Content-Length: 510
User-Agent: GuzzleHttp/7
Host: etain.mike2k.de
Depth: 1
Content-Type: application/xml; charset=UTF-8
foo@ex.com
<<<<<<<<
HTTP/1.1 207 Multi-Status
Server: nginx
Date: Sun, 31 Mar 2024 08:38:28 GMT
Content-Type: text/xml; charset=utf-8
Content-Length: 2493
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
X-Frame-Options: SAMEORIGIN
/SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/sabre-vobject-a44a962d-110a-42b6-8e1b-f7df655404db.vcf"gcs00000000"BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.5.4//EN
UID:sabre-vobject-a44a962d-110a-42b6-8e1b-f7df655404db
FN:CardDavClient Test25842248
N:Test25842248;CardDavClient
NICKNAME:Jonny1
EMAIL:maxmu@abcd.com
X-CUSTOMPROP;X-SPACEPARAM="HELLO, WORLD";X-CUSTOMPARAM=HOME,WORK:foobar
END:VCARDHTTP/1.1 200 OK/SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/sabre-vobject-9e667a3a-10f7-4315-a127-cfa4b2a0fe97.vcf"gcs00000000"BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.5.4//EN
UID:sabre-vobject-9e667a3a-10f7-4315-a127-cfa4b2a0fe97
FN:CardDavClient Test31398396
N:Test31398396;CardDavClient
NICKNAME:Jonny2
TEL;TYPE=HOME:12345
TEL:555
END:VCARDHTTP/1.1 200 OK/SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/sabre-vobject-e30b7469-dfb1-41b8-8300-a21205c8b358.vcf"gcs00000000"BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.5.4//EN
UID:sabre-vobject-e30b7469-dfb1-41b8-8300-a21205c8b358
FN:CardDavClient Test916984687
N:Test916984687;CardDavClient
NICKNAME:Jonny3
ITEM1.EMAIL:foo@ex.com
ITEM1.X-ABLABEL:CustomLabel
IMPP;TYPE=HOME;X-SERVICE-TYPE=Jabber:xmpp:foo@example.com
END:VCARDHTTP/1.1 200 OK/SOGo/dav/mikey@dev.mike2k.de/Contacts/personal/sabre-vobject-04122e61-c800-4099-b0e9-6cf91b96f985.vcf"gcs00000000"BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.5.4//EN
UID:sabre-vobject-04122e61-c800-4099-b0e9-6cf91b96f985
FN:CardDavClient Test953816473
N:Test953816473;CardDavClient
NICKNAME:Jonny0
EMAIL;TYPE=WORK:doe@big.corp
EMAIL;TYPE=HOME:johndoe@example.com
X-CUSTOMPROP;X-CUSTOMPARAM=WORK:foobar
END:VCARDHTTP/1.1 200 OK
--------
NULL