Mailing List Archive

escaped semicolons in iOS contacts
Dear list,

I'm fighting a rather severe issue between DAViCal and iOS clients these
days and I need your help.
It is pretty much exactly the same issue that was discussed on this
mailing list before in April 2012 between Arnaud and Andrew. See this
link for their discussion and behavioural descriptions (without a solution):
http://davical-general.89287.n3.nabble.com/Davical-general-CardDAV-ADR-field-after-modifications-by-evolution-and-an-iPhone-td3925529.html

As back then, iOS seems to escape all the semicolons in its vcard
address fields (also in its ORG field but its not causing much trouble
there except for an annoying list of trailing ';' on a contacts company
field).

The PUT request of a new contact from the iPhone (iOS 8.2 but the
problem exists at least down to 8.1.0) logged by davical with

$c->dbg = array( 'request' => 1, 'statistics' => 1 );

looks fine to me:

davical: LOG: :***************** Request Header ****************
davical: LOG: :PUT
/calendar/caldav.php/test/addresses/C5BC9110-93D0-0001-3915-14511E004C20.vcf
davical: LOG: headers:-->Host: testserver.tld
davical: LOG: headers:-->Authorization: Delicious tasty password eaten
by debugging monster!
davical: LOG: headers:-->Content-Type: text/vcard; charset=utf-8
davical: LOG: headers:-->Accept: */*
davical: LOG: headers:-->If-Match: "068d20bad0f79785610a55c66246af51"
davical: LOG: headers:-->Content-Length: 503
davical: LOG: headers:-->Accept-Language: de-de
davical: LOG: headers:-->Accept-Encoding: gzip, deflate
davical: LOG: headers:-->Connection: keep-alive
davical: LOG: headers:-->User-Agent: iOS/8.2 (12D508) dataaccessd/1.0
davical: LOG: :******************** Request ********************
davical: LOG: request:-->BEGIN:VCARD
davical: LOG: request:-->VERSION:3.0
davical: LOG: request:-->PRODID:-//Apple Inc.//iOS 8.2//EN
davical: LOG: request:-->N:Lastname;Firstname;;;
davical: LOG: request:-->FN:Firstname Lastname
davical: LOG: request:-->ORG:Testcompany;
davical: LOG:
request:-->EMAIL;type=INTERNET;type=WORK;type=pref:email@testcompany.com
davical: LOG: request:-->item1.ADR;type=WORK;type=pref:;;Teststreet
777;Somwhere;;99999;Germany
davical: LOG: request:-->item1.X-ABADR:de
davical: LOG: request:-->REV:2015-03-25T13:36:20Z
davical: LOG: request:-->UID:C5BC9110-93D0-0001-3915-14511E004C20.vcf
davical: LOG: request:-->END:VCARD
davical: LOG: request:-->
davical: DBG: statistics:Method: PUT, Status: 204, Script: 0,084s,
Queries: 0,026s, URL:
/test/addresses/C5BC9110-93D0-0001-3915-14511E004C20.vcf, Memory: 641k,
Peak: 768k

But what I see in my database after querying it by
SELECT * FROM caldav_data WHERE caldav_data ILIKE '%testcompany%';

is this:

BEGIN:VCARD\r
VERSION:3.0\r
PRODID:-//Apple Inc.//iOS 8.2//EN\r
N:Lastname;Firstname;;;\r
FN:Firstname Lastname\r
ORG:Testcompany\;\r
EMAIL;TYPE=INTERNET;TYPE=WORK;TYPE=pref:email@testcompany.com\r
ITEM1.ADR;TYPE=WORK;TYPE=pref:\r
\;\;Teststreet 777\;Somewhere\;\;99999\;Deutschland\r
ITEM1.X-ABADR:de\r
URL;TYPE=WORK;TYPE=pref:www.testcompany.com\r
UID:C5BC9110-93D0-0001-3915-14511E004C20\r
REV:20150325T142211Z\r
END:VCARD\r

I have this problem on 2 different servers, both running an up-to-date
and patched version of DAViCal 1.1.3.1, PHP-5.6.6-2 and PostgreSQL 9.1/9.4.
For now I manually repaired the faulty contacts and told the iOS users
to not update any contact with their devices but obviously this is not a
very desirable situation, especially since synchronization with
Thunderbird stops working completely once there's a malformed contact in
the database.

Any help on where to look next would be greatly appreciated.
Or anybody else having this problem?

Thanks you,
Paul

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general