Skip to content

Reject paths with malformed UTF-8 as corrupted (2.x backport) - #1940

Open
IonBazan wants to merge 1 commit into
thephpleague:2.xfrom
IonBazan:fix/2.x-malformed-utf8-path
Open

IonBazan wants to merge 1 commit into
thephpleague:2.xfrom
IonBazan:fix/2.x-malformed-utf8-path

Conversation

@IonBazan

Copy link
Copy Markdown

This backports the fix for CVE-2026-102601 to 2.x, so WhitespacePathNormalizer rejects paths containing malformed UTF-8 instead of letting them bypass the control-character check.

preg_match() returns false on invalid UTF-8, which was treated as "no match". Any non-zero result now throws CorruptedPathDetected, matching ef4a9a5 on 3.x.

Closes #1925

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant