Files
firefox/testing/web-platform/tests/html/syntax
Mason Freed d622401bc7 Bug 1599892 [wpt PR 20489] - Fix parser mXSS sanitizer bypass for <p> and <br> within foreign context, a=testonly
Automatic update from web-platform-tests
Fix parser mXSS sanitizer bypass for <p> and <br> within foreign context

Prior to this CL, the following code:
 <svg></p></svg>
parsed to this innerHTML: <svg><p></p></svg>

This is in contrast to this code:
 <svg><p></svg>
which parses to <svg></svg><p></p>

The fact that the </p> is left inside the <svg> allowed sanitizer
bypasses as detailed in [1]. Please also see [2] for the spec
discussion.

With this CL, </p> and </br> within a foreign context now cause
the closing of the foreign context.

[1] https://research.securitum.com/dompurify-bypass-using-mxss/
[2] https://github.com/whatwg/html/issues/5113

Bug: 1005713
Change-Id: Ic07ee50de4eb1ef19b73a075bd83785c99f4f891
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940722
Reviewed-by: Kouhei Ueno <[email protected]>
Commit-Queue: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/master@{#720315}

--

wpt-commits: 561b765308e6d188618f3ba73091bb598d8357ce
wpt-pr: 20489
2019-12-04 12:13:03 +00:00
..
…