Skip to content

Fix code scanning alert no. 2: Reflected server-side cross-site scripting#4620

Draft
fgalan wants to merge 1 commit intomasterfrom
autofix/alert-2-2855ffb254
Draft

Fix code scanning alert no. 2: Reflected server-side cross-site scripting#4620
fgalan wants to merge 1 commit intomasterfrom
autofix/alert-2-2855ffb254

Conversation

@fgalan
Copy link
Copy Markdown
Member

@fgalan fgalan commented Oct 4, 2024

Fixes https://github.com/telefonicaid/fiware-orion/security/code-scanning/2

To fix the reflected server-side cross-site scripting vulnerability, we need to ensure that any user-provided data is properly escaped before being included in the response. In Python, the html.escape() function can be used to escape special characters in the user input to prevent XSS attacks.

We will:

  1. Import the html module.
  2. Use the html.escape() function to escape user-provided data before it is accumulated in the ac string.

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

…ting

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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