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

[Yaml] Fix uid binary parsing #52443

Merged
merged 1 commit into from Nov 5, 2023
Merged

Conversation

mRoca
Copy link
Contributor

@mRoca mRoca commented Nov 3, 2023

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
License MIT

Currently, on SF 5.4 & 6.4, a YAML file containing { uid: !!binary Ju0Yh+uqSXOagJZFTlUt8g== } cannot be parsed because of a preg_match error: Malformed UTF-8 characters, possibly incorrectly encoded.

This is because preg_match should not be run over a binary string, but this specific binary string matches the following tests : \is_string($value) && '' !== $value && '&' === $value[0] (the string starts with 0x26 , which is the UTF-8 & char).

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "5.4" but it seems your PR description refers to branch "5.4 and next".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

Copy link
Member

@xabbuh xabbuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fabpot
Copy link
Member

fabpot commented Nov 5, 2023

Thank you @mRoca.

@fabpot fabpot merged commit a432b12 into symfony:5.4 Nov 5, 2023
9 of 11 checks passed
@mRoca mRoca deleted the fix/yaml-utf8-uid-parsing branch November 6, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants