3 ms·
I note that MediaWiki's VisualEditor uses DOMPurify in some capacity.
by pabs3 6y ago
I note that MediaWiki's VisualEditor uses DOMPurify in some capacity.
- bawolff 6y agoLast i checked, it was only used for stuff provided to the user themselves (so a bypass in dompurify would allow you to xss yourself but not others.). However that was a long time ago, so im not sure what the current state is.
- MatmaRex 6y agoYeah, that's true. We also always use the RETURN_DOM_FRAGMENT / RETURN_DOM options, which avoids the issue according to the article (I don't think we serialize/reparse the output anywhere ourselves). And also, we forbid the 'style' tag, which seems to be required by the exploits (although that is just a lucky coincidence). https://github.com/wikimedia/VisualEditor/blob/master/src/ve.sanitize.js#L16 https://github.com/wikimedia/VisualEditor/blob/master/src/ve...