-
Notifications
You must be signed in to change notification settings - Fork 250
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]>
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.