Skip to content
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

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fgalan
Copy link
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