Skip to content
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

Reject non-HTTP schemes in StreamHandler #2989

Merged
merged 2 commits into from Mar 13, 2022
Merged

Commits on Feb 24, 2022

  1. Handle non-HTTP schemes gracefully in StreamHandler

    If an URI that does not use the HTTP stream wrapper is passed to the
    StreamHandler then the magic `$http_response_header` variable will not be
    filled, thus remaining `null`.
    
    This ultimately results in a `TypeError`, because `null` is passed to
    HeaderProcessor::parseHeaders(), which expects an `array`.
    TimWolla committed Feb 24, 2022
    Copy the full SHA
    5172455 View commit details
    Browse the repository at this point in the history
  2. Reject non-HTTP schemes in StreamHandler

    Non-HTTP schemes are effectively not supported, because the HTTP response
    headers will only be filled for the `http` and `https` stream wrappers. Also
    Guzzle is an HTTP client after all.
    
    Reject non-HTTP schemes early on to improve error messages and to prevent
    possible exploits using odd stream wrappers in case an non-fully-trusted URL is
    passed to Guzzle.
    TimWolla committed Feb 24, 2022
    Copy the full SHA
    d198940 View commit details
    Browse the repository at this point in the history