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

Mitigate Server-side Reflected XSS Vulnerability in Alerts Route #377

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

Conversation

Onyx2406
Copy link
Contributor

@Onyx2406 Onyx2406 commented Jul 1, 2023

Fixes Issue

#376

Changes proposed

This PR mitigates a server-side reflected XSS vulnerability in the /alerts// route by sanitizing user inputs before returning them to the webpage. This has been accomplished by using Flask's escape() method on the user input data before adding it to the response.

The affected parameters alert_timestamp, alert_ID, profile_ip, and tw_name are now properly escaped to prevent potential cross-site scripting attacks.

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Note to reviewers

Please ensure the sanitization has no effect on the overall functionality and output of the set_alerts route. If you encounter any issues, let me know and I'll make the necessary adjustments.

@eldraco
Copy link
Collaborator

eldraco commented Jul 4, 2023

This is so good! thanks for the fix! Our first XSS ever! We are testing and will merge soon.

@Onyx2406
Copy link
Contributor Author

Hi there, any updates on this?

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.

None yet

2 participants