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] Sanitize iframe src attribute's input #619

Closed
wants to merge 1 commit into from
Closed

Conversation

@d3xter666 d3xter666 requested a review from a team November 24, 2023 08:32
@coveralls
Copy link

Coverage Status

coverage: 93.375% (-0.2%) from 93.586%
when pulling fbc75aa on fix-xss-in-dom
into ff1dc29 on main.

Copy link
Member

@flovogt flovogt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @codeworrior please have also a look at this one

@d3xter666
Copy link
Contributor Author

Closing this one as we discussed in the meeting.

$iframe.attr is a jQuery/DOM API and it handles string escaping internally. So, this CodeQL alert is a false positive.

$frame.attr("src", "\"> <script>alert('test');</script><!--"); // Escaped and displayed properly in browser's console

$frame.attr("src"); // Getter. Returns: `"> \x3Cscript>alert('test');\x3C/script>\x3C!--`

@d3xter666 d3xter666 closed this Nov 28, 2023
@flovogt flovogt deleted the fix-xss-in-dom branch November 28, 2023 14:08
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

3 participants