Skip to content

Commit 7e500da

Browse files
committed
Add more tests for mXSS
1 parent 849e9f5 commit 7e500da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

OWASP.AntiSamyTests/Html/AntiSamyTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,10 @@ public void TestSmuggledTagsInStyleContent()
903903
.Should().NotContain("script");
904904
antisamy.Scan("<select<style/>k<input<</>input/onfocus=alert(1)>", policy).GetCleanHtml()
905905
.Should().NotContain("input");
906+
antisamy.Scan("<style/><listing/>]]><noembed></style><img src=x onerror=mxss(1)></noembed>", policy).GetCleanHtml()
907+
.Should().NotContain("mxss");
908+
antisamy.Scan("<style/><math>'<noframes ></style><img src=x onerror=mxss(1)></noframes>'", policy).GetCleanHtml()
909+
.Should().NotContain("mxss");
906910
}
907911

908912
[Test]

0 commit comments

Comments
 (0)