Skip to content

Commit 612436c

Browse files
committed
added support for style sanitization testing
Also bumped version to latest in maven
1 parent 191d5f7 commit 612436c

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

JavaHTMLSanitizer/app/WebContent/index.jsp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
<form action="SanitizeServlet" method="POST">
1212
<b>Please enter some HTML and try to XSS the server-side sanitizer!</b><br/><br/>
1313
The current server-side policy allows the following tags ("a", "p", "div", "i", "b", "em",<br/>
14-
"blockquote", "tt", "strong", "br", "ul", "ol", "li") and only certain attributes.<br/><br/> Good luck!<br/><br/>
14+
"blockquote", "tt", "strong", "br", "ul", "ol", "li") and only certain attributes.<br/>
15+
We have also enabled "allowStyling" so you can test against our new CSS sanitization.<br/>
16+
Good luck!<br/><br/>
1517
<textarea rows="10" cols="80" name="usercontent"></textarea><br/>
1618
<input type="submit" value="submit">
1719
</form>
18-
<br/>
20+
<hr/>
1921
<h1>OWASP Java Encoder Test</h1>
2022
<form action="EncodeServlet" method="POST">
2123
&lt;!DOCTYPE html&gt;<br/>

JavaHTMLSanitizer/app/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>OWASPBugBounty</groupId>
44
<artifactId>OWASPBugBounty</artifactId>
5-
<version>0.0.1-SNAPSHOT</version>
5+
<version>0.1.1-SNAPSHOT</version>
66
<packaging>war</packaging>
77
<build>
88
<sourceDirectory>src</sourceDirectory>
@@ -35,7 +35,7 @@
3535
<dependency>
3636
<groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
3737
<artifactId>owasp-java-html-sanitizer</artifactId>
38-
<version>20160413.1</version>
38+
<version>20160628.1</version>
3939
</dependency>
4040
<dependency>
4141
<groupId>org.owasp.encoder</groupId>

JavaHTMLSanitizer/app/src/SanitizeAction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ protected void doPost(HttpServletRequest request,
4949
// Custom slashdot tags.
5050
// These could be rewritten in the sanitizer using an ElementPolicy.
5151
.allowElements("quote", "ecode")
52+
// Allows for tests against new CSS sanitization
53+
.allowStyling()
5254
.toFactory();
5355

5456
//accepting user content and converting nulls to empty strings

0 commit comments

Comments
 (0)