Ticket #359 (new defect)

Opened 8 years ago

Last modified 7 years ago

Don't tolerated malformed vcards (was: Malformed(?) VCARD causes hang)

Reported by: flash666@… Owned by: dgollub
Priority: normal Milestone:
Component: Format Plugin: vformat Version: 0.20
Severity: normal Keywords: version vcard hang hung


In the SetupGuide? part of the test process involved the manual creation of a VCARD without a VERSION tag. I have changed it now, because doing so and attempting a kdepim-file sync results in msynctool hanging. I had a couple of test contacts in KDE, and an empty directory. I successfully synched the two. Then I added a vcard to the directory that looked like this:

N:test user

msynctool then hung on the next run while attempting to send this to the kde member. After changing the VCARD to look like this:

N:test user

the synch was fine. Log files all at http://www.bus-times.org.uk/dump

According to the VCARD 2.1 spec (http://www.imc.org/pdi/vcard-21.txt):

This property specifies the identifier corresponding to the highest version number of the vCard Specification supported by the implementation that created the vCard object. The value of this property must be 2.1 to correspond to this specification.. 
This property is identified by the property name VERSION. The following is an example of this property:
Support for this property is mandatory for implementations conforming to this specification. This property must appear within the vCard data stream.

So I suppose cards of this type should be considered malformed, logged and ignored.

Change History

comment:1 Changed 8 years ago by cstender

  • Milestone set to 0.21

comment:2 Changed 8 years ago by pmarat

  • Status changed from new to closed
  • Resolution set to fixed

this should be fixed with r1696

comment:3 Changed 8 years ago by pmarat

  • Status changed from closed to reopened
  • Resolution fixed deleted

r1709 reopens this ticket

comment:4 Changed 8 years ago by dgollub

  • Owner changed from ehabkost to dgollub
  • Status changed from reopened to new
  • Version changed from 0.19 to 0.20
  • Component changed from Plugin: kdepim to OpenSync

I will try to workaround this for 0.21 .. maybe osync_filter can help.

comment:5 Changed 8 years ago by cstender

  • Milestone 0.21 deleted

comment:8 Changed 7 years ago by dgollub

  • Component changed from OpenSync to Plugin: vformat
  • Summary changed from Malformed(?) VCARD causes hang to Don't tolerated malformed vcards (was: Malformed(?) VCARD causes hang)

In OpenSync? 0.33 it doesn't cause anymore a hang. The vformat tolerates malformed entries and adds required VEERSION information... the vcard* -> xmlforamt-contact should do a sanity check if the vcard is malformed (missing version header) and throw an error ... instead of tolerating.

dani@K51:~/Sync/file> cat 1/contact/malformat.vcf 
N:test user
dani@K51:~/Sync/file> cat 2/contact/malformat.vcf 
N:test user

This entry got synced with OpenSync? 0.33 from member 1 to member 2. Note: tail is missing of synced entry (directory 2).

Note: See TracTickets for help on using tickets.