Skip to content

.Net: [Breaking] Harden plugin security defaults for WebFileDownloadPlugin#13644

Merged
rogerbarreto merged 3 commits intomicrosoft:mainfrom
rogerbarreto:bugfix/webfiledownload-plugin
Mar 18, 2026
Merged

.Net: [Breaking] Harden plugin security defaults for WebFileDownloadPlugin#13644
rogerbarreto merged 3 commits intomicrosoft:mainfrom
rogerbarreto:bugfix/webfiledownload-plugin

Conversation

@rogerbarreto
Copy link
Member

Motivation and Context

Improve control and security settings for WebFileDownloadPlugin

  • Change AllowedDomains and AllowedFolders defaults from null (allow-all) to empty (deny-all)
  • Change DisableFileOverwrite default to true
  • Set MaximumDownloadSize default to 10 MB
  • Add path canonicalization via Path.GetFullPath() to prevent directory traversal
  • Switch folder matching from exact to prefix-based with separator handling
  • Fix fileMode variable not being used in FileStream constructor
  • Add XML doc security remarks to all three plugins
  • Update tests for new defaults

@rogerbarreto rogerbarreto self-assigned this Mar 10, 2026
@rogerbarreto rogerbarreto requested a review from a team as a code owner March 10, 2026 12:40
@rogerbarreto rogerbarreto changed the title .Net: Harden plugin security defaults for WebFileDownloadPlugin .Net: [Breaking] Harden plugin security defaults for WebFileDownloadPlugin Mar 11, 2026
@rogerbarreto rogerbarreto added this pull request to the merge queue Mar 11, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 11, 2026
@rogerbarreto rogerbarreto enabled auto-merge March 18, 2026 16:02
…Plugin, and FileIOPlugin

- Change AllowedDomains and AllowedFolders defaults from null (allow-all) to empty (deny-all)
- Change DisableFileOverwrite default to true
- Set MaximumDownloadSize default to 10 MB
- Add path canonicalization via Path.GetFullPath() to prevent directory traversal
- Switch folder matching from exact to prefix-based with separator handling
- Fix fileMode variable not being used in FileStream constructor
- Add XML doc security remarks to all three plugins
- Update tests for new defaults

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rogerbarreto rogerbarreto added this pull request to the merge queue Mar 18, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 18, 2026
@rogerbarreto rogerbarreto enabled auto-merge March 18, 2026 21:28
@rogerbarreto rogerbarreto added this pull request to the merge queue Mar 18, 2026
Merged via the queue into microsoft:main with commit 2c880ea Mar 18, 2026
18 checks passed
@rogerbarreto rogerbarreto deleted the bugfix/webfiledownload-plugin branch March 18, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants