Skip to content

Commit

Permalink
Add test for nested incomplete tag sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
vin01 committed Aug 30, 2022
1 parent af5407d commit 824d03d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/tm-cases/nested_incomplete_tags_xss.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<p>&lt;img &lt;img src="" onerror=alert(/XSS/) </p>

<p>&lt;img&lt;img src="" onerror=alert(/XSS/) </p>

<p>&lt;img&lt;img/src="" onerror=alert(/XSS/) </p>

<p>&lt;img&lt;img&lt;img src="" onerror=alert(/XSS/) </p>
1 change: 1 addition & 0 deletions test/tm-cases/nested_incomplete_tags_xss.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"safe_mode": "replace"}
7 changes: 7 additions & 0 deletions test/tm-cases/nested_incomplete_tags_xss.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<img <img src="" onerror=alert(/XSS/)

<img<img src="" onerror=alert(/XSS/)

<img<img/src="" onerror=alert(/XSS/)

<img<img<img src="" onerror=alert(/XSS/)

0 comments on commit 824d03d

Please sign in to comment.