Fix XSS vulnerability in PATH environment variable rendering#432
Merged
bart-vmware merged 3 commits intoupdate-samples-to-dotnet-10from Dec 17, 2025
Merged
Fix XSS vulnerability in PATH environment variable rendering#432bart-vmware merged 3 commits intoupdate-samples-to-dotnet-10from
bart-vmware merged 3 commits intoupdate-samples-to-dotnet-10from
Conversation
Co-authored-by: bart-vmware <104792814+bart-vmware@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Address feedback on updating samples to dotnet 10
Fix XSS vulnerability in PATH environment variable rendering
Dec 17, 2025
bart-vmware
requested changes
Dec 17, 2025
Member
bart-vmware
left a comment
There was a problem hiding this comment.
Please take these suggestions. The ?. is no longer needed.
Configuration/src/ConfigurationProviders/Views/Home/PlaceholderValues.cshtml
Outdated
Show resolved
Hide resolved
Configuration/src/ConfigurationProviders/Views/Home/PlaceholderValues.cshtml
Outdated
Show resolved
Hide resolved
Co-authored-by: bart-vmware <104792814+bart-vmware@users.noreply.github.com>
Contributor
Author
Applied in commit 74f31e7. Removed the unnecessary |
bart-vmware
approved these changes
Dec 17, 2025
bart-vmware
added a commit
that referenced
this pull request
Dec 18, 2025
* Initial plan * Fix XSS vulnerability by HTML-encoding before replacing delimiters Co-authored-by: bart-vmware <104792814+bart-vmware@users.noreply.github.com> * Remove unnecessary null-conditional operator after Html.Encode Co-authored-by: bart-vmware <104792814+bart-vmware@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bart-vmware <104792814+bart-vmware@users.noreply.github.com>
bart-vmware
added a commit
that referenced
this pull request
Dec 19, 2025
* Initial plan * Fix XSS vulnerability by HTML-encoding before replacing delimiters Co-authored-by: bart-vmware <104792814+bart-vmware@users.noreply.github.com> * Remove unnecessary null-conditional operator after Html.Encode Co-authored-by: bart-vmware <104792814+bart-vmware@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bart-vmware <104792814+bart-vmware@users.noreply.github.com>
bart-vmware
added a commit
that referenced
this pull request
Jan 6, 2026
* Update target frameworks * Update ASP.NET and EF Core versions to 10.0.* * Update launchSettings.json to use https schema * Update launchSettings.json: remove IIS Express * In WebAPI projects, set launchBrowser=false and remove launchUrl swagger * Replace Swashbuckle with ASP.NET OpenAPI * Convert static assets handling * Update wwwroot * Adapt for changed path in wwwroot * Update feature files for .NET 10 * Update markdown files for .NET 10 * Update GHA workflow for .NET 10 * Configuration: fix rendering of PATH environment variable * Discovery: Fix README after update from #429 * FileShares: Remove unused variable * Management: downgrade Pomelo.EntityFrameworkCore.MySql * Management: Fix startup error: Use BaseUrl instead of BasePath to configure the absolute URL to register with * Management: Remove obsolete .WithOpenApi() * Management: fix inconsistent line endings * Package updates * Fix XSS vulnerability in PATH environment variable rendering (#432) * Initial plan * Fix XSS vulnerability by HTML-encoding before replacing delimiters Co-authored-by: bart-vmware <104792814+bart-vmware@users.noreply.github.com> * Remove unnecessary null-conditional operator after Html.Encode Co-authored-by: bart-vmware <104792814+bart-vmware@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bart-vmware <104792814+bart-vmware@users.noreply.github.com> * Discovery: fix invalid executable on Windows deployment --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.
Addressed XSS vulnerability where
Html.Raw()was rendering user-controllable environment variable data without encoding.Changes
Html.Encode()before delimiter replacement inPlaceholderValues.cshtmlThis ensures HTML entities are escaped before rendering while preserving intended
<br/>line breaks. The null-conditional operator (?.) is not needed sinceHtml.Encode()handles null values by returning an empty string.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.