Repository navigation
Strip sensitive headers on cross-origin download redirects - #6664
Merged
AmirMS (AmelBawa-msft) merged 4 commits intoNov 11, 2026
Merged
AmirMS (AmelBawa-msft) merged 4 commits into
AmirMS (AmelBawa-msft) merged 4 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Authenticated installer downloads switch directly to WinINet, bypassing Delivery Optimization’s cost and cellular restrictions that must remain enforced.
1 open issue
What changed in this PR
This PR hardens WinGet downloads by controlling authenticated redirects and stripping sensitive headers when the destination origin changes.
Changes:
- Adds per-hop redirect handling, HTTPS downgrade protection, and a redirect limit.
- Routes authenticated installer downloads through WinINet rather than Delivery Optimization.
- Adds redirect-policy and transport tests, localhost test endpoints, and a release note.
| File | Description |
|---|---|
src/LocalhostWebServer/Startup.cs |
Adds loopback-only redirect and header-check endpoints. |
src/AppInstallerCommonCore/Public/AppInstallerDownloader.h |
Documents sensitive-header redirect behavior. |
src/AppInstallerCommonCore/Downloader.cpp |
Implements redirect safeguards and authenticated-download routing. |
src/AppInstallerCommonCore/DODownloader.cpp |
Adds a Delivery Optimization test override. |
src/AppInstallerCLITests/TestHooks.h |
Exposes redirect-policy and downloader test hooks. |
src/AppInstallerCLITests/Downloader.cpp |
Adds policy, transport, and downloader-routing coverage. |
doc/release-notes/1.31/authenticated-download-redirects.md |
Documents the sensitive-header protection. |
Review effort: Balanced
JohnMcPMS
reviewed
Nov 10, 2026
JohnMcPMS
approved these changes
Nov 11, 2026
AmirMS (AmelBawa-msft)
deleted the
user/amelbawa/fix-authenticated-redirects
branch
November 11, 2026 04:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📖 Description
Prevent automatic redirects from forwarding sensitive download headers to another origin.
🔗 References
🔍 Validation
✅ Checklist
🤖 AI Assistance
📋 Issue Type
Microsoft Reviewers: Open in CodeFlow