-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
Bug 🐛Something isn't workingSomething isn't workingP3 TriagedIssue has been reviewed as part of legacy backlog grooming (project P3).Issue has been reviewed as part of legacy backlog grooming (project P3).Question ❓Further information is requestedFurther information is requestedTriaged: v4Triaged, to be implemented as part of Vanilla v4Triaged, to be implemented as part of Vanilla v4
Description
I noticed when reviewing the TICS report for react-components that there are some uses of dangerouslySetInnerHTML
that were flagged as XSS vulnerabilities.
Flag 1: Chip (src)
Flag 2: FilterPanelSection of Search and Filter (src)
Are these left here intentionally so that our users have the freedom to place whatever they like in the chips, and thus they have the responsibility to sanitize contents? Otherwise, we could use something like dompurify to sanitize the inner HTML, i.e:
import { sanitize } from 'dompurify'
//
//
const el = ({ text }) => {
return (
<h3
dangerouslySetInnerHTML={{
__html: sanitize(text)
}}
/>
);
}
Here's what a change to fix this might look like: jmuzina@f3371c6
Metadata
Metadata
Assignees
Labels
Bug 🐛Something isn't workingSomething isn't workingP3 TriagedIssue has been reviewed as part of legacy backlog grooming (project P3).Issue has been reviewed as part of legacy backlog grooming (project P3).Question ❓Further information is requestedFurther information is requestedTriaged: v4Triaged, to be implemented as part of Vanilla v4Triaged, to be implemented as part of Vanilla v4