Skip to content

Fix URL percent-decoding of %00 #752

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

Merged
merged 1 commit into from
Jul 20, 2024
Merged

Conversation

jrflat
Copy link
Contributor

@jrflat jrflat commented Jul 19, 2024

URLParser's percent-decoding function used String(validatingUTF8:), which would truncate the string if we had just decoded %00 to NULL. Instead of using a NULL-terminated OutputBuffer, I switched to using String(_validating:as:), which handles/accepts NULL characters in the buffer.

@jrflat
Copy link
Contributor Author

jrflat commented Jul 19, 2024

@swift-ci please test

@jrflat jrflat requested a review from parkera July 19, 2024 22:40
@jrflat jrflat merged commit c0a485e into swiftlang:main Jul 20, 2024
3 checks passed
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.

2 participants