Skip to content

Fix code scanning alert no. 12: Cross-site scripting - #2611

Merged
velo merged 1 commit into
masterfrom
alert-autofix-12
Oct 21, 2024
Merged

velo merged 1 commit into
masterfrom
alert-autofix-12

Conversation

@velo

@velo velo commented Oct 21, 2024

Copy link
Copy Markdown
Member

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

To fix the cross-site scripting vulnerability, we need to ensure that any user input included in the response is properly sanitized or encoded. In this case, we can use the HtmlUtils.htmlEscape method from the org.springframework.web.util package to encode the user inputs before concatenating them into the response string. This will prevent any malicious scripts from being executed if the response is rendered in an HTML 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 ca15b95 into master Oct 21, 2024
@velo
velo deleted the alert-autofix-12 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.

1 participant