Skip to content

[release/2.3] Forwarded Headers Middleware: Ignore XForwardedHeaders from Unknown Proxy #61642

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

Open
wants to merge 1 commit into
base: release/2.3
Choose a base branch
from

Conversation

BrennanConroy
Copy link
Member

Backport of #61530 to release/2.3

Forwarded Headers Middleware: Ignore XForwardedHeaders from Unknown Proxy

Description

If the ForwardedHeadersMiddleware middleware is used without using XForwardedFor then the KnownNetworks and KnownProxies checks are skipped.

Fixes #61449

Customer Impact

Expectations for KnownNetworks and KnownProxies settings are not always met. If you aren't careful with configuring your app (careful meaning aware of this issue), you can end up allowing traffic you didn't intend to allow.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Runs a check that was already there but runs it in more cases.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

When servicing release/2.1

  • Make necessary changes in eng/PatchConfig.props

@BrennanConroy BrennanConroy added the Servicing-consider Shiproom approval is required for the issue label Apr 23, 2025
@BrennanConroy BrennanConroy requested review from Tratcher and a team as code owners April 23, 2025 22:01
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares label Apr 23, 2025
@BrennanConroy BrennanConroy added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Apr 24, 2025
Copy link
Contributor

Hi @@BrennanConroy. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant