Skip to content

Conversation

@velo
Copy link
Member

@velo velo commented Oct 21, 2024

Fixes https://github.com/OpenFeign/feign/security/code-scanning/6

To fix the cross-site scripting vulnerability, we need to ensure that any user-controlled input is properly sanitized or encoded before being included in the HTTP response. In this case, we can use the HtmlUtils.htmlEscape method from the org.springframework.web.util package to escape the filename before including it in the response body. This will prevent any malicious scripts from being executed if the filename is rendered in a web page context.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@velo velo merged commit c18f07a into master Oct 21, 2024
2 of 3 checks passed
@velo velo deleted the alert-autofix-6 branch October 21, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants