-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
[Search,Dropdown,XSS] prevent JS execution from manual entries or untrusted remote data #298
[Search,Dropdown,XSS] prevent JS execution from manual entries or untrusted remote data #298
Conversation
…still supporting HTML Dropdown Items
… only want to avoid HTML.
…itize html template response values if wanted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I forgot to sanitize the dropdown templates respecting the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR sanitizes the probably fetched and vulnerable HTML Data for dropdown user additions aswell as for search response values.
For
search
an additional optionpreserveHTML
(defaulttrue
) (adopted from dropdown where this is already available). When this is set tofalse
every result value from the response stream will be sanitized in the default templates.Testcase
unfixed dropdown
https://jsfiddle.net/9x8tqdam/
fixed dropdown
https://jsfiddle.net/9x8tqdam/1/
To test search you need to setup something locally to fake evil remote api data:
Initialize the search specifying a url which points to some evil prepared
fakeapi.json
-file to simulate a vulnerable remote api siteThe evil
fakeapi.json
could look likeCloses
Semantic-Org/Semantic-UI#4498
Semantic-Org/Semantic-UI#6571
Semantic-Org/Semantic-UI#3318
Relates to
Semantic-Org/Semantic-UI#6570
Semantic-Org/Semantic-UI#5376
Semantic-Org/Semantic-UI#1033
Semantic-Org/Semantic-UI#4592
To fulfill the demands of the above mentioned issues i will add appropriate security-informations to the docs once this PR is approved and merged