Skip to content

Conversation

@tsjnsn
Copy link
Owner

@tsjnsn tsjnsn commented Feb 6, 2025

Potential fix for https://github.com/tsjnsn/poe2-tradealert/security/code-scanning/7

To fix the problem, we need to ensure that any user-provided data is properly sanitized or escaped before being inserted into the HTML. The best way to fix this issue is to use a library that provides robust escaping functions for HTML content. One such library is DOMPurify, which can sanitize HTML and prevent XSS attacks.

We will:

  1. Import the DOMPurify library.
  2. Use DOMPurify to sanitize the errorObj before inserting it into the HTML.

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

tsjnsn and others added 2 commits February 6, 2025 10:56
…cripting

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…eted as HTML

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.

2 participants