Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 7.2
Bug fix? no
New feature? no
Deprecations? no
Issues -
License MIT

The behavior of parse_url() doesn't match how browsers parse URLs. This PR ensures we won't accept URLs that are invalid per https://url.spec.whatwg.org/:

  • URLs that contain a backslash
  • or start/end with a control-char or a space
  • or contain a CR/LF/TAB character

@carsonbot carsonbot added this to the 7.2 milestone Nov 6, 2024
@carsonbot carsonbot changed the title [DependencyInjection][Routing][HttpClient] Reject URIs that contain invalid characters [DependencyInjection][HttpClient][Routing] Reject URIs that contain invalid characters Nov 6, 2024
@nicolas-grekas nicolas-grekas merged commit 352786c into symfony:7.2 Nov 6, 2024
7 of 10 checks passed
@fabpot fabpot mentioned this pull request Nov 6, 2024
@nicolas-grekas nicolas-grekas deleted the parse-url-hardening branch November 6, 2024 11:32
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.

2 participants