[Owncloud] (Closed) Issue #2335 - Backslashed commas in FirstName, LastName, Company in Mac OS X Contacts (carddav)

Justin Vallon justinvallon at gmail.com
Tue Sep 17 20:29:39 UTC 2013


On 9/16/13 7:56 PM, Thomas Tanghus wrote:
 > That would be great. Make sure it contains the body of the PUT 
request. Also please attach an anonymized version of one of the vCards 
in question. You can download it from the web UI.

I entered First Name "First,Name", Last Name "Last,Name", Company 
"Company,String".  Came back with backslashed commas in all three 
fields.  vCard in web interface is correct in browser.  When I 
double-click the downloaded card to import into Contacts application, it 
shows backslashes in the imported card, as well.

Here is Put & Get & DB dump.  vCard attached.

Put:

PUT 
/owncloud/remote.php/carddav/addressbooks/justin/contacts/90e63ccd-c570-460f-b0c1-9288cf1dd301.vcf 
HTTP/1.1
Host: host.net
User-Agent: Mac OS X/10.8.5 (12F37) AddressBook/1170
Content-Length: 226
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
If-None-Match: *
Content-Type: text/vcard; charset=utf-8
Connection: keep-alive
Authorization: Basic ...

BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.8.5//EN
N:Last\,Name;First\,Name;;;
FN:First\,Name Last\,Name
ORG:Company\,String;
REV:2013-09-17T20:04:14Z
UID:90e63ccd-c570-460f-b0c1-9288cf1dd301
END:VCARD

Get:

REPORT /owncloud/remote.php/carddav/addressbooks/justin/contacts/ HTTP/1.1
Host: host.net
User-Agent: Mac OS X/10.8.5 (12F37) AddressBook/1170
Content-Length: 358
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Content-Type: text/xml
Authorization: Basic ...
Connection: keep-alive

<?xml version="1.0" encoding="UTF-8"?>
<B:addressbook-multiget xmlns:B="urn:ietf:params:xml:ns:carddav">
   <A:prop xmlns:A="DAV:">
     <A:getetag/>
     <B:address-data/>
   </A:prop>
   <A:href 
xmlns:A="DAV:">/owncloud/remote.php/carddav/addressbooks/justin/contacts/90e63ccd-c570-460f-b0c1-9288cf1dd301.vcf</A:href>
</B:addressbook-multiget>
HTTP/1.1 207 Multi-Status
Date: Tue, 17 Sep 2013 20:04:15 GMT
Server: Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 PHP/5.3.27
X-Powered-By: PHP/5.3.27
Strict-Transport-Security: max-age=0
Set-Cookie: 5201a343082c9=drlgs0cf4av2d0qk304vm3o1v0; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, 
pre-check=0
Pragma: no-cache
Set-Cookie: 5201a343082c9=g55k3n48fl7huk3fnh97bcbo82; path=/; HttpOnly
Vary: Brief,Prefer
Content-Length: 764
Keep-Alive: timeout=5, max=97
Connection: Keep-Alive
Content-Type: application/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" 
xmlns:card="urn:ietf:params:xml:ns:carddav"><d:response><d:href>/owncloud/remote.php/carddav/addressbooks/justin/contacts/90e63ccd-c570-460f-b0c1-9288cf1dd301.vcf</d:href><d:propstat><d:prop><card:address-data>BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.8.5//EN
N:Last\\,Name;First\\,Name;;;
FN:First\,Name Last\,Name
ORG:Company\\,String;
REV:2013-09-17T20:04:14+00:00
UID:90e63ccd-c570-460f-b0c1-9288cf1dd301
END:VCARD
</card:address-data><d:getetag>"2c312175933bd932d8d50b01f04c3211"</d:getetag></d:prop><d:status>HTTP/1.1 
200 OK</d:status></d:propstat></d:response></d:multistatus>

sqlite3 owncloud.db
sqlite> select * from oc_contacts_cards where id = 366;
id          addressbookid  fullname carddata 
uri                                       lastmodified
----------  -------------  ---------------------- 
--------------------------------------------------------------------------------------------- 
----------------------------------------  ------------
366         2              First\,Name Last\,Name  BEGIN:VCARD
VERSION:3.0
PRODID:-//Apple Inc.//Mac OS X 10.8.5//EN
N:Last\\,Name;First\\,Name;;;
FN:First\,Name Last\,Name
ORG:Company\\,String;
REV:2013-09-17T20:04:14+00:00
UID:90e63ccd-c570-460f-b0c1-9288cf1dd301
END:VCARD
   90e63ccd-c570-460f-b0c1-9288cf1dd301.vcf  1379448254
sqlite> select * from oc_contacts_cards_properties where contactid = 366;
id          userid      contactid   name value                      
preferred
----------  ----------  ----------  ---------- 
-------------------------  ----------
2771        justin      366         N Last\,Name;First\,Name;;;  0
2772        justin      366         FN          First\,Name 
Last\,Name     0
2773        justin      366         ORG Company\,String;           0
2774        justin      366         UID 90e63ccd-c570-460f-b0c1-9  0



-- 
-Justin
JustinVallon at gmail.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: card.vcf
Type: text/vcard
Size: 225 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20130917/b7a1f5a6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4258 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20130917/b7a1f5a6/attachment-0001.bin>


More information about the Owncloud mailing list