-
Notifications
You must be signed in to change notification settings - Fork 249
Fix XSS vulnerability in PATH environment variable rendering #432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: bart-vmware <[email protected]>
|
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:
|
bart-vmware
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Applied in commit 74f31e7. Removed the unnecessary |
* Initial plan * Fix XSS vulnerability by HTML-encoding before replacing delimiters Co-authored-by: bart-vmware <[email protected]> * Remove unnecessary null-conditional operator after Html.Encode Co-authored-by: bart-vmware <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: bart-vmware <[email protected]>
* Initial plan * Fix XSS vulnerability by HTML-encoding before replacing delimiters Co-authored-by: bart-vmware <[email protected]> * Remove unnecessary null-conditional operator after Html.Encode Co-authored-by: bart-vmware <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: bart-vmware <[email protected]>
* 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 <[email protected]> * Remove unnecessary null-conditional operator after Html.Encode Co-authored-by: bart-vmware <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: bart-vmware <[email protected]> * Discovery: fix invalid executable on Windows deployment --------- Co-authored-by: Copilot <[email protected]>
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.