commit | d16226271d4d501de19f019aba1c145930b45503 | [log] [tgz] |
---|---|---|
author | Mason Freed <masonfreed@chromium.org> | Sat Nov 30 07:48:15 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Sat Nov 30 07:48:15 2019 |
tree | 751f60562b6899a301cd2dce924a72d56280ced9 | |
parent | 373d764fb0056a63eb91cd332824417aa9022fb6 [diff] |
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 <kouhei@chromium.org> Commit-Queue: Mason Freed <masonfreed@chromium.org> Cr-Commit-Position: refs/heads/master@{#720315}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .