Skip to content

Commit 90be286

Browse files
committed
updated maven site to use reflow
1 parent 8b23ab6 commit 90be286

File tree

12 files changed

+336
-261
lines changed

12 files changed

+336
-261
lines changed

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<artifactId>encoder</artifactId>
5050
<packaging>jar</packaging>
5151

52-
<name>OWASP Encoders</name>
52+
<name>Java Encoder</name>
5353
<description>
5454
The OWASP Encoders package is a collection of high-performance low-overhead
5555
contextual encoders, that when utilized correctly, is an effective tool in

core/src/main/java/org/owasp/encoder/Encode.java

Lines changed: 147 additions & 155 deletions
Large diffs are not rendered by default.

core/src/site/markdown/index.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## OWASP Java Encoder
2+
3+
The OWASP Java Encoder is a collection of high-performance low-overhead
4+
contextual encoders that, when utilized correctly, is an effective tool in
5+
preventing Web Application security vulnerabilities such as Cross-Site
6+
Scripting (XSS).
7+
8+
Please see the [OWASP XSS Prevention Cheat Sheet](https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet)
9+
for more information on preventing XSS.
10+
11+
For use within JSP pages consider using the [JSP Encoder](../encoder-jsp/index.html) as it
12+
provides a TLD to make the use of the core encoders easier.
13+
14+
### Usage
15+
16+
The JARs can be found in [Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.owasp.encoder%22).
17+
18+
```xml
19+
<dependency>
20+
<groupId>org.owasp.encoder</groupId>
21+
<artifactId>encoder</artifactId>
22+
<version>1.2.1</version>
23+
</dependency>
24+
```
25+
26+
Utilize the encoder:
27+
28+
```java
29+
import org.owasp.encoder.Encode;
30+
31+
//...
32+
33+
PrintWriter out = ....;
34+
out.println("<textarea>" + Encode.forHtml(userData) + "</textarea>");
35+
```

core/src/site/site.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
3636
3737
-->
3838
<project name="Encoder">
39-
<bannerLeft>
40-
<name>OWASP Java Encoder Project: CORE</name>
41-
<title>OWASP Java Encoder Project: CORE</title>
42-
<alt>OWASP Java Encoder Project: CORE</alt>
43-
<src>../images/owasp.jpg</src>
44-
<height>107</height>
45-
<width>300</width>
46-
</bannerLeft>
4739
<body>
48-
<breadcrumbs>
49-
<item name="OWASP Java Encoder Project" href="../index.html"/>
50-
</breadcrumbs>
51-
<!--menu name="Getting Started">
52-
<item name="Installation" href="installation.html"/>
53-
<item name="Usage" href="usage.html"/>
54-
</menu-->
55-
<menu ref="reports" />
5640
</body>
5741
</project>

esapi/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<artifactId>encoder-esapi</artifactId>
5050
<packaging>jar</packaging>
5151

52-
<name>OWASP Encoders ESAPI Thunk</name>
52+
<name>ESAPI Thunk</name>
5353
<description>
5454
The OWASP Encoders ESAPI Thunk provides an easy way to plugin the Encoder
5555
Projects API into an implementation of ESAPI.

esapi/src/site/site.xml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
3636
3737
-->
3838
<project name="ESAPI">
39-
<bannerLeft>
40-
<name>OWASP Java Encoder Project: ESAPI</name>
41-
<title>OWASP Java Encoder Project: ESAPI</title>
42-
<alt>OWASP Java Encoder Project: ESAPI</alt>
43-
<src>../images/owasp.jpg</src>
44-
<height>107</height>
45-
<width>300</width>
46-
</bannerLeft>
4739
<body>
48-
<breadcrumbs>
49-
<item name="OWASP Java Encoder Project" href="../index.html"/>
50-
</breadcrumbs>
51-
<!--menu name="Getting Started">
52-
<item name="Installation" href="installation.html"/>
53-
<item name="Usage" href="usage.html"/>
54-
</menu-->
55-
<menu ref="reports" />
56-
</body>
40+
</body>
5741
</project>

jsp/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<artifactId>encoder-jsp</artifactId>
5050
<packaging>jar</packaging>
5151

52-
<name>OWASP Encoders JSP tags and EL functions</name>
52+
<name>JSP Encoder</name>
5353
<description>
5454
The OWASP Encoder JSP package contains JSP tag definitions and TLDs to allow
5555
easy use of the OWASP Encoder Project's core API. The TLDs contain both tag

jsp/src/site/markdown/index.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## OWASP JSP
2+
3+
The OWASP JSP Encoder is a collection of high-performance low-overhead
4+
contextual encoders that, when utilized correctly, is an effective tool in
5+
preventing Web Application security vulnerabilities such as Cross-Site
6+
Scripting (XSS).
7+
8+
Please see the [OWASP XSS Prevention Cheat Sheet](https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet)
9+
for more information on preventing XSS.
10+
11+
### JSP Usage
12+
13+
The JSP Encoder makes the use of the Java Encoder within JSP simple via a TLD that
14+
includes tags and a set of JSP EL functions:
15+
16+
```xml
17+
<dependency>
18+
<groupId>org.owasp.encoder</groupId>
19+
<artifactId>encoder-jsp</artifactId>
20+
<version>1.2.1</version>
21+
</dependency>
22+
```
23+
24+
```JSP
25+
<%@taglib prefix="e" uri="https://www.owasp.org/index.php/OWASP_Java_Encoder_Project" %>
26+
27+
<%-- ... --%>
28+
29+
<p>Dynamic data via EL: ${e:forHtml(param.value)}</p>
30+
<p>Dynamic data via tag: <e:forHtml value="${param.value}" /></p>
31+
```

jsp/src/site/site.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
3636
3737
-->
3838
<project name="JSP">
39-
<bannerLeft>
40-
<name>OWASP Java Encoder Project: JSP</name>
41-
<title>OWASP Java Encoder Project: JSP</title>
42-
<alt>OWASP Java Encoder Project: JSP</alt>
43-
<src>../images/owasp.jpg</src>
44-
<height>107</height>
45-
<width>300</width>
46-
</bannerLeft>
4739
<body>
48-
<breadcrumbs>
49-
<item name="OWASP Java Encoder Project" href="../index.html"/>
50-
</breadcrumbs>
51-
<!--menu name="Getting Started">
52-
<item name="Installation" href="installation.html"/>
53-
<item name="Usage" href="usage.html"/>
54-
</menu-->
55-
<menu ref="reports" />
5640
</body>
5741
</project>

pom.xml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<version>1.2.1-SNAPSHOT</version>
4646
<packaging>pom</packaging>
4747

48-
<name>OWASP Encoders Parent</name>
48+
<name>OWASP Java Encoder Project</name>
4949
<description>
5050
The OWASP Encoders package is a collection of high-performance low-overhead
5151
contextual encoders, that when utilized correctly, is an effective tool in
@@ -183,7 +183,7 @@
183183
<plugin>
184184
<groupId>org.codehaus.mojo</groupId>
185185
<artifactId>cobertura-maven-plugin</artifactId>
186-
<version>2.7</version>
186+
<version>2.6</version>
187187
</plugin>
188188
<plugin>
189189
<groupId>org.apache.maven.plugins</groupId>
@@ -208,7 +208,26 @@
208208
<plugin>
209209
<groupId>org.apache.maven.plugins</groupId>
210210
<artifactId>maven-site-plugin</artifactId>
211-
<version>3.5.1</version>
211+
<!-- upgrading beyond 3.4 may break the reflow skin -->
212+
<version>3.4</version>
213+
<dependencies>
214+
<dependency>
215+
<groupId>lt.velykis.maven.skins</groupId>
216+
<artifactId>reflow-velocity-tools</artifactId>
217+
<version>1.1.1</version>
218+
</dependency>
219+
<!-- Reflow skin requires Velocity >= 1.7 -->
220+
<dependency>
221+
<groupId>org.apache.velocity</groupId>
222+
<artifactId>velocity</artifactId>
223+
<version>1.7</version>
224+
</dependency>
225+
<dependency>
226+
<groupId>org.apache.maven.doxia</groupId>
227+
<artifactId>doxia-module-markdown</artifactId>
228+
<version>1.6</version>
229+
</dependency>
230+
</dependencies>
212231
</plugin>
213232
<plugin>
214233
<groupId>org.apache.maven.plugins</groupId>
@@ -308,21 +327,6 @@
308327
<plugin>
309328
<groupId>org.apache.maven.plugins</groupId>
310329
<artifactId>maven-site-plugin</artifactId>
311-
<dependencies>
312-
<dependency>
313-
<groupId>org.apache.maven.doxia</groupId>
314-
<artifactId>doxia-core</artifactId>
315-
<version>1.7</version>
316-
</dependency>
317-
<dependency>
318-
<groupId>org.apache.maven.doxia</groupId>
319-
<artifactId>doxia-module-markdown</artifactId>
320-
<version>1.7</version>
321-
</dependency>
322-
</dependencies>
323-
<configuration>
324-
<skipDeploy>true</skipDeploy>
325-
</configuration>
326330
</plugin>
327331
</plugins>
328332
</build>

0 commit comments

Comments
 (0)