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. 9: DOM text reinterpreted as HTML #422

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

Plaenkler
Copy link
Owner

Fixes https://github.com/Plaenkler/DDNS-Updater/security/code-scanning/9

To fix the problem, we need to ensure that the textContent is properly encoded before being used in the URL. This can be achieved by using a function to encode the text content to ensure that any special characters are safely represented.

  1. Create a utility function to encode the text content.
  2. Use this function to encode the textContent before constructing the URL.

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>
@Plaenkler Plaenkler self-assigned this Sep 30, 2024
@Plaenkler Plaenkler added the bug Something isn't working label Sep 30, 2024
@Plaenkler Plaenkler marked this pull request as ready for review September 30, 2024 17:15
@Plaenkler Plaenkler changed the title Fix code scanning alert no. 9: DOM text reinterpreted as HTML [FIX] Code scanning alert no. 9: DOM text reinterpreted as HTML Sep 30, 2024
@Plaenkler Plaenkler merged commit bd9410f into main Oct 1, 2024
15 checks passed
@Plaenkler Plaenkler deleted the autofix/alert-9-4e9ffe52c5 branch October 1, 2024 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants