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

iFrame #2940

Merged
merged 1 commit into from Mar 17, 2016
Merged

iFrame #2940

merged 1 commit into from Mar 17, 2016

Conversation

protich
Copy link
Member

@protich protich commented Feb 26, 2016

This pull request addresses a case where iframe gets dropped as well was potential XSS security exploit in html cleanup.

  • Whitelist iframe as allowed html node without content when dom (php-xml) is used to balance the tags.
  • Decode html entities before sanitization to avoid potential htmLawed bypass. By default, Format::safe_html will now decode html entities before the balancing and cleanup is done.

return "</{$el}>";

// Remove iframe and embed without src (perhaps striped by spec)
// It would be awesome to rickroll such entry :)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@greezybacon
Copy link
Contributor

I'm trying to open a ticket with bioinformatics on the Unicode corruption issue. Looks like I can't post on their forum even after confirming my email address...

Encoded entities can be used to bypass safety checks
Don't remove iframe when using xml_dom to balance tags
greezybacon added a commit that referenced this pull request Mar 17, 2016
iFrame 

Reviewed-By: Jared Hancock <jared@osticket.com>
@greezybacon greezybacon merged commit 83d1f53 into osTicket:develop Mar 17, 2016
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