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

vCard v3.0/v4.0 parsing: Bare BASE64 parameter is incorrectly recognized as ENCODING=BASE64 #689

Open
respiranto opened this issue Sep 23, 2024 · 1 comment

Comments

@respiranto
Copy link

When parsing a v3.0 or v4.0 vCard, a bare BASE64 parameter is wrongly parsed as if it was ENCODING=BASE64 (which would be valid for v2.1).

For v3.0, validate() yields the error that ENCODING=BASE64 is not valid, and with the REPAIR flag it translates that to ENCODING=B.
For v4.0, validate() yields the error that ENCODING is not a valid parameter.

I would expect that either

  • parsing fails, or
  • validate() yields the error message that BASE64 is not a valid parameter, or that bare parameter values are not supported in v3.0/v4.0.

Optionally, validate() with the REPAIR flag might do some suitable repairing.

See also #688.

@respiranto
Copy link
Author

The problem seems to be that Parameter::guessParameterNameByValue() is applied not only to v2.1 vCards.

@respiranto respiranto changed the title v3.0/v4.0 parsing: Bare BASE64 parameter is incorrectly recognized as ENCODING=BASE64 vCard v3.0/v4.0 parsing: Bare BASE64 parameter is incorrectly recognized as ENCODING=BASE64 Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant