Skip to content

Conversation

@DeagleGross
Copy link
Member

Describes that FileName should not be used directly as per doc. Raises user attention when using Filename directly

Copilot AI review requested due to automatic review settings December 5, 2025 10:16
@github-actions github-actions bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Dec 5, 2025
@DeagleGross DeagleGross enabled auto-merge (squash) December 5, 2025 10:16
Copilot finished reviewing on behalf of DeagleGross December 5, 2025 10:18
Copy link
Contributor

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 guidance to the IFormFile.FileName property documentation, warning developers about potential security risks when using the file name from untrusted sources. The documentation aligns with official ASP.NET Core security best practices.

  • Adds XML <remarks> section warning against using FileName for anything other than display/logging
  • Includes security guidance about HTML encoding and path manipulation risks
  • Provides a code example demonstrating how to sanitize file names

DeagleGross and others added 2 commits December 5, 2025 11:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DeagleGross DeagleGross merged commit a5f5e0a into main Dec 5, 2025
30 checks passed
@DeagleGross DeagleGross deleted the dmkorolev/formfile-doc branch December 5, 2025 18:24
@dotnet-policy-service dotnet-policy-service bot added this to the 11.0-preview1 milestone Dec 5, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants