Commit a432b12
committed
bug symfony#52443 [Yaml] Fix uid binary parsing (mRoca)
This PR was merged into the 5.4 branch.
Discussion
----------
[Yaml] Fix uid binary parsing
| 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).
Commits
-------
ce3e282 [Yaml] Fix uid binary parsing2 files changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
371 | 374 | | |
372 | 375 | | |
373 | 376 | | |
| |||
0 commit comments