Skip to content

Commit

Permalink
Add more tests for mXSS
Browse files Browse the repository at this point in the history
  • Loading branch information
spassarop committed Jul 3, 2023
1 parent 849e9f5 commit 7e500da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions OWASP.AntiSamyTests/Html/AntiSamyTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,10 @@ public void TestSmuggledTagsInStyleContent()
.Should().NotContain("script");
antisamy.Scan("<select<style/>k<input<</>input/onfocus=alert(1)>", policy).GetCleanHtml()
.Should().NotContain("input");
antisamy.Scan("<style/><listing/>]]><noembed></style><img src=x onerror=mxss(1)></noembed>", policy).GetCleanHtml()
.Should().NotContain("mxss");
antisamy.Scan("<style/><math>'<noframes ></style><img src=x onerror=mxss(1)></noframes>'", policy).GetCleanHtml()
.Should().NotContain("mxss");
}

[Test]
Expand Down

0 comments on commit 7e500da

Please sign in to comment.