6.0.0-beta1
7/6/25

[#14944] CardDAV: Bad comma separation for CATEGORIES property, aka tags
Summary CardDAV: Bad comma separation for CATEGORIES property, aka tags
Queue Turba
Queue Version FRAMEWORK_5_2
Type Bug
State Not A Bug
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester bugs.horde.org (at) ulle (dot) dyndns (dot) org
Created 08/20/2019 (2147 days ago)
Due
Updated 09/30/2019 (2106 days ago)
Assigned 09/28/2019 (2108 days ago)
Resolved 09/30/2019 (2106 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
09/30/2019 05:46:23 PM Michael Rubinsky State ⇒ Not A Bug
 
09/29/2019 08:54:54 PM bugs (dot) horde (dot) org (at) ulle (dot) dyndns (dot) org Comment #4 Reply to this comment
Thanks for digging into this. And for pointing out where I was wrong.

The trimming for CardDAV export is done in function tovCard(...) , 
case '__tags':
https://github.com/horde/turba/blob/master/lib/Driver.php#L1818
leading to 
https://github.com/horde/Core/blob/master/lib/Horde/Core/Tagger.php#L89

I was seeing the misbehavior with a Debian Jessie installation (which 
is oldoldstable now), where
case '__tags': is not calling Turba_Tagger::split() but doing a simple 
explode(',', $val) instead. And unfortunately I thought the error is 
caused by synchronizeTags(), which hasn't changed much since then.

So this was fixed ages ago, for Debian since Stretch/9 , as I see now.
Sorry for stealing your time, Michael.
...and I can't reproduce this using the 'Card Book' add on to 
Thunderbird as described in the ticket.  My tags are being correctly 
trimmed as they are synchronized.

Please provide a step-by-step way of reproducing this.
09/28/2019 07:17:19 PM Michael Rubinsky Comment #3
Priority ⇒ 1. Low
Reply to this comment
...and I can't reproduce this using the 'Card Book' add on to 
Thunderbird as described in the ticket.  My tags are being correctly 
trimmed as they are synchronized.

Please provide a step-by-step way of reproducing this.
09/28/2019 06:58:19 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Assigned to Michael Rubinsky
Reply to this comment
Yes, we store it with a comma-space separator, but only internally in 
Turba. When the Turba_Object is converted to a vCard, this property is 
split and trimmed in Turba_Tagger::split();

I'll have to trace the code after I get a Thunderbird install going to 
see where this is(not) happening.

[Show Quoted Text - 24 lines]
08/20/2019 11:55:34 AM bugs (dot) horde (dot) org (at) ulle (dot) dyndns (dot) org Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ CardDAV: Bad comma separation for CATEGORIES property, aka tags
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
When syncing address book entry via CardDAV Horde is sending the 
CATEGORIES property with wrong separation. Horde internally uses 
categories as tags (or vice versa).

RFC is postulating for CATEGORIES property value: "One or more text 
values separated by a COMMA character"
https://tools.ietf.org/html/rfc6350#section-6.7.1

Horde separates by a comma and a space character.

This misbeavior is coming from function synchronizeTags(array $tags) 
in turba/lib/Object.php
...
$this->setValue('__tags', implode(', ', $tags));
...
https://github.com/horde/turba/blob/master/lib/Object.php#L313

Some CardDAV clients , for example Thunderbird plugin CardBook, adding 
the additional space char to the name of the category . As CardBook is 
using categories for grouping cards, this leads to lots of confusion.

Looking forward to seeing this fixed.

Saved Queries