Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Escape optgroup label when appending to HTML. #2881

Merged
merged 1 commit into from
Sep 5, 2017
Merged

Conversation

adunkman
Copy link
Contributor

@adunkman adunkman commented Sep 5, 2017

@harvesthq/chosen-developers

Hot on the tails of the 1.8.1 release (and as a follow-up to #2879), this PR fixes a cross-site scripting vulnerability discovered when applying the 1.8.1 release to Harvest.

When an optgroup’s label is not highlighted, we’re using the unescaped version of the label attribute — but we’re safe when the highlighting is added, since we’re escaping each HTML fragment when building the highlighted string.

Included is a test which asserts HTML tags are not rendered into HTML unescaped in this case.

Copy link
Contributor

@satchmorun satchmorun left a comment

Choose a reason for hiding this comment

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

👍

@adunkman adunkman merged commit 42d9c88 into master Sep 5, 2017
@adunkman adunkman deleted the xss-in-group-labels branch September 5, 2017 20:02
@garpalhares
Copy link

garpalhares commented Oct 21, 2017

(Sorry my bad english)
I can not disable of the plugin boxes in mobile. Stay like this: http://prntscr.com/h0btw4
(I used 'display: none !important; ')

Copy link

@slobonmyknob939 slobonmyknob939 left a comment

Choose a reason for hiding this comment

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

multiple

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants