You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Patch Changes
createRequest() and createRequestListener() now validate the request host for every handler, including handlers that take no arguments. The effective host, whether it comes from the host option, a trusted Forwarded or X-Forwarded-Host header, HTTP/2 :authority, or Host, must be a hostname or bracketed IPv6 address with an optional port. Values with a path, query, fragment, userinfo, whitespace, or control characters, such as example.com/../admin or user@example.com, make createRequest() throw. createRequestListener() passes the error to onError and responds with 400 Bad Request unless onError returns a response. An invalid trusted X-Forwarded-Host is rejected instead of falling back to Host. (#12331)