[kdepimlibs] [Bug 332340] New: VCard import: CRLF in encoded lines breaks parsing of contact information

Frank Steinmetzger Warp_7 at gmx.de
Wed Mar 19 23:14:58 GMT 2014


https://bugs.kde.org/show_bug.cgi?id=332340

            Bug ID: 332340
           Summary: VCard import: CRLF in encoded lines breaks parsing of
                    contact information
    Classification: Unclassified
           Product: kdepimlibs
           Version: 4.12.2
          Platform: Gentoo Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: critical
          Priority: NOR
         Component: kabc
          Assignee: kdepim-bugs at kde.org
          Reporter: Warp_7 at gmx.de

I recently exported the contacts from an android device into a single vcard
file. I then created a new read-only address book based directly on that file.
I noticed immediately that some contacts were missing, and others had wrong
contents in some fields.

The effects were, for instance, truncated Notes fields, a messed up company
name and a truncated URL field (only showed "http://", the rest was missing).
Digging deeper, I found out that the problem are DOS-Style newlines, i.e.
<CR><LF>, in encoded fields (lines with =65=A3= and so on instead of clear
text). After I changed the file to Unix-newlines (just <LF>) using vim, all
contacts and their fields were imported properly.

The URL example I mentioned was at first strange – the URL was short, not
wrapped and also not encoded. But the previous line in the VCF had the postal
address was wrapped and encoded that way because it contained non-ASCII
characters. After I removed the address from the file, the URL field was
imported properly.

This was just an attempt of a manual “contact sync” between phone and KDE until
I get a local sync server running. But this has the potential of a cascading
data loss on both ends of the sync, hence I marked this as critical.

Reproducible: Always

Steps to Reproduce:
1. Have a VCard file with DOS-type newlines (CRLF).
2. Have a field encoded with hex values and wrapped
Actual Results:  
The field that comes after the wrapped and encoded line is not imported
properly. It may be garbled, truncated or not show up at all, which may even
lead to the contact being discarded by the importer.

All data was imported correctly once the linebreaks were converted to
Unix-style (LF).

Expected Results:  
All fields should be imported correctly regardless of file formatting.

The VCF in question was produced by the stock android contacts app. I tried
looking for duplicates, but am not sure.
#320196 talks about VCF export.

Thanks for your consideration.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list