Skip to content

Conversation

divyeshio
Copy link
Contributor

Include a warning about host spoofing in xml

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Summary of the changes

Adds remarks for warning about host spoofing
Changes taken from previously unmerged PR #54971

Description

Update API remarks for RoutingEndpointConventionBuilderExtensions.RequireHost to warn about host spoofing

This is how it looks like in VS code after changes. Idk why crefs are not rendered properly in VS code.

image

Fixes #48818

@Copilot Copilot AI review requested due to automatic review settings August 7, 2025 17:39
@divyeshio divyeshio requested a review from halter73 as a code owner August 7, 2025 17:39
@github-actions github-actions bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Aug 7, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Aug 7, 2025
Copy link
Contributor

Thanks for your PR, @@divyeshio. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds important security-related documentation to the RequireHost method by including XML documentation remarks that warn developers about host spoofing vulnerabilities. The changes provide guidance on how to properly verify server names and local ports to prevent spoofing attacks.

  • Adds comprehensive XML documentation with security warnings about Host header spoofing
  • Provides specific mitigation recommendations using TLS handshake verification and connection info validation
  • Includes a new using directive for Microsoft.AspNetCore.Http to support the documentation references

Copy link
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions community-contribution Indicates that the PR has been added by a community member pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update API remarks for RoutingEndpointConventionBuilderExtensions.RequireHost to warn about host spoofing
2 participants