Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to parse vCard with DQUOTE in param, as generated by Apple #111

Open
da4089 opened this issue Feb 17, 2025 · 0 comments
Open

Fail to parse vCard with DQUOTE in param, as generated by Apple #111

da4089 opened this issue Feb 17, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request radicale Reported by Radicale

Comments

@da4089
Copy link

da4089 commented Feb 17, 2025

Quick Summary
A vCard with DQUOTE characters in a parameter value is raises a parsing error. This is correct behaviour according to the spec, but some Apple products appear to emit this format (with the DQUOTEs backslash escaped).

It'd be generous to accept this with non-strict parsing.

See Kozea/Radicale#1492

Context

  • vObject version: 0.9.9
  • Python version: 3.9
  • Operating system and version: macOS 11

Description
See the discussion in the Radicale bug above for full details.

To Reproduce
The following code exhibits the problem.

import vobject

vcs = (
    r"BEGIN:VCARD" "\r\n"
    r"VERSION:3.0" "\r\n"
    r"FN: Example #2" "\r\n"
    r"N:Stevenson;John;Philip, Paul;Dr.;Jr., M.D., A.C.P." "\r\n"
    r'X-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-ADDRESS=Αεροδρόμιο Θεσσαλονίκης' "\r\n"
    r' \"Μακεδονία\" 551 03 Thessaloniki Greece;X-TITLE=Thessaloniki Internatio' "\r\n"
    r' nal Airport:geo:40.520833,22.972222' "\r\n"
    r"END:VCARD" "\r\n"
)

vobject.parseOne(vcs)

Further Notes
To be clear, vobject is correct in rejecting this: allowing it would be supporting a deployed product with non-conforming behaviour.

@da4089 da4089 self-assigned this Feb 17, 2025
@da4089 da4089 added enhancement New feature or request radicale Reported by Radicale labels Feb 17, 2025
da4089 added a commit to da4089/vobject that referenced this issue Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request radicale Reported by Radicale
Projects
None yet
Development

No branches or pull requests

1 participant