Skip to content

Check for invalid URLRequest header values #4650

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
Jan 11, 2023

Conversation

jrflat
Copy link
Contributor

@jrflat jrflat commented Oct 25, 2022

The URLRequest implementation previously allowed arbitrary CR and LF characters in header values. This change checks header values for invalid characters before setting or adding them to the request. It does allow for header line folding (CRLF followed by HTAB or SP), consistent with URLRequest on Darwin.

@parkera
Copy link
Contributor

parkera commented Oct 25, 2022

@swift-ci test

@parkera parkera merged commit 314bb06 into swiftlang:main Jan 11, 2023
jrflat added a commit to jrflat/swift-corelibs-foundation that referenced this pull request Jan 11, 2023
jrflat added a commit to jrflat/swift-corelibs-foundation that referenced this pull request Jan 11, 2023
parkera pushed a commit that referenced this pull request Jan 12, 2023
Co-authored-by: Jonathan Flat <[email protected]>

Co-authored-by: Jonathan Flat <[email protected]>
parkera pushed a commit that referenced this pull request Jan 12, 2023
Co-authored-by: Jonathan Flat <[email protected]>

Co-authored-by: Jonathan Flat <[email protected]>
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