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. 20: Unsafe jQuery plugin #3921

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

Conversation

alex-w
Copy link
Member

@alex-w alex-w commented Sep 28, 2024

Fixes https://github.com/Stellarium/stellarium/security/code-scanning/20

To fix the problem, we need to ensure that the options.of input is always treated as a CSS selector and not as HTML. This can be achieved by using the jQuery.find method, which interprets the input strictly as a CSS selector. This change will prevent any potential XSS vulnerabilities arising from interpreting the input as HTML.

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>
@alex-w alex-w marked this pull request as ready for review September 28, 2024 16:36
@alex-w alex-w added this to the 24.4 milestone Sep 28, 2024
@gzotti
Copy link
Member

gzotti commented Sep 28, 2024

We can update our own imported modules 1/year or so, but try not to diverge from upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants