Skip to content

[v12] - Additional safety with X-Forwarded-Host handling (#30980)#31026

Merged
jentfoo merged 1 commit intobranch/v12from
jent/forwarded-host-safety-v12
Aug 25, 2023
Merged

[v12] - Additional safety with X-Forwarded-Host handling (#30980)#31026
jentfoo merged 1 commit intobranch/v12from
jent/forwarded-host-safety-v12

Conversation

@jentfoo
Copy link
Copy Markdown
Contributor

@jentfoo jentfoo commented Aug 25, 2023

v12 backport of PR #30980

* Additional safety with `X-Forwarded-Host` handling

This adds `utils.GetSingleHeader` as a common way to make sure that additional headers are not being inserted into the request.
We use this in the `aws`, `azure`, and `gcp` handler as part of verifying the source of the request.

In addition `alpnproxy/local_proxy.go` contains a fix where an invalid `Host` header can allow an arbitrary `X-Forwarded-Host` value to pass through unchanged.

* Apply PR feedback around error type and testing
@jentfoo jentfoo added this pull request to the merge queue Aug 25, 2023
Merged via the queue into branch/v12 with commit 1553625 Aug 25, 2023
@jentfoo jentfoo deleted the jent/forwarded-host-safety-v12 branch August 25, 2023 17:06
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.

3 participants