Skip to content

Contacts import: vCard 2.1: Incorrect unfolding #9647

Description

@respiranto

Prerequisites

  • I have searched for duplicate or closed issues
  • I can recreate the issue with all plugins disabled

Describe the issue

When importing from vCard 2.1 format, the unfolding is incorrect.

Unfolding is different for v2.1 versus v3.0/v4.0.

The docs (vCard 2.1 specs (section 2.1.3), RFC 822#3.1.1) are somewhat confusing (notably, the examples do not match the description), but they say "Unfolding is accomplished by regarding CRLF immediately followed by a LWSP-char as equivalent to the LWSP-char." (LWSP-char is SPACE or HTAB.)

Example:

BEGIN:VCARD
VERSION:2.1
N:Doe;Jane;;;
FN:Jane Doe
NOTE:an
 example
END:VCARD

Expected result: Note: an example
Actual result: Note: anexample

See also bug report #9531/1, and the corresponding merge request #9637, which fixed a similar bug for v3.0 and v4.0.
See also the same bug in sabre/vobject: sabre/vobject#690.

What browser(s) are you seeing the problem on?

Firefox

What version of PHP are you using?

8.2.20

What version of Roundcube are you using?

master / d31c536

JavaScript errors

No response

PHP errors

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions