Skip to content

Commit 9a06b5c

Browse files
committed
fix: update esapi
resolves #74
1 parent 58bd93d commit 9a06b5c

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

esapi/pom.xml

+15-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,21 @@
6767
<dependency>
6868
<groupId>org.owasp.esapi</groupId>
6969
<artifactId>esapi</artifactId>
70-
<version>[2.2.3.1,3)</version>
70+
<version>[2.5.1.0,3)</version>
7171
</dependency>
7272
</dependencies>
73+
74+
<build>
75+
<plugins>
76+
<plugin>
77+
<groupId>org.apache.maven.plugins</groupId>
78+
<artifactId>maven-failsafe-plugin</artifactId>
79+
<configuration>
80+
<systemPropertyVariables>
81+
<java.util.logging.config.file>${project.basedir}/src/test/resources/logging.properties</java.util.logging.config.file>
82+
</systemPropertyVariables>
83+
</configuration>
84+
</plugin>
85+
</plugins>
86+
</build>
7387
</project>

esapi/src/main/java/org/owasp/encoder/esapi/ESAPIEncoder.java

+34
Original file line numberDiff line numberDiff line change
@@ -141,114 +141,148 @@ private enum Impl implements Encoder {
141141
private final Encoder _referenceEncoder = DefaultEncoder.getInstance();
142142

143143
/** {@inheritDoc} */
144+
@Override
144145
public String canonicalize(String s) {
145146
return _referenceEncoder.canonicalize(s);
146147
}
147148

148149
/** {@inheritDoc} */
150+
@Override
149151
public String canonicalize(String s, boolean strict) {
150152
return _referenceEncoder.canonicalize(s, strict);
151153
}
152154

153155
/** {@inheritDoc} */
156+
@Override
154157
public String canonicalize(String s, boolean restrictMultiple, boolean restrictMixed) {
155158
return _referenceEncoder.canonicalize(s, restrictMultiple, restrictMixed);
156159
}
157160

158161
/** {@inheritDoc} */
162+
@Override
159163
public String getCanonicalizedURI(URI dirtyUri) {
160164
return _referenceEncoder.getCanonicalizedURI(dirtyUri);
161165
}
162166

163167
/** {@inheritDoc} */
168+
@Override
164169
public String encodeForCSS(String s) {
165170
return Encode.forCssString(s);
166171
}
167172

168173
/** {@inheritDoc} */
174+
@Override
169175
public String encodeForHTML(String s) {
170176
return Encode.forHtml(s);
171177
}
172178

173179
/** {@inheritDoc} */
180+
@Override
174181
public String decodeForHTML(String s) {
175182
return _referenceEncoder.decodeForHTML(s);
176183
}
177184

178185
/** {@inheritDoc} */
186+
@Override
179187
public String encodeForHTMLAttribute(String s) {
180188
return Encode.forHtmlAttribute(s);
181189
}
182190

183191
/** {@inheritDoc} */
192+
@Override
184193
public String encodeForJavaScript(String s) {
185194
return Encode.forJavaScript(s);
186195
}
187196

188197
/** {@inheritDoc} */
198+
@Override
189199
public String encodeForVBScript(String s) {
190200
return _referenceEncoder.encodeForVBScript(s);
191201
}
192202

193203
/** {@inheritDoc} */
204+
@Override
194205
public String encodeForSQL(Codec codec, String s) {
195206
return _referenceEncoder.encodeForSQL(codec, s);
196207
}
197208

198209
/** {@inheritDoc} */
210+
@Override
199211
public String encodeForOS(Codec codec, String s) {
200212
return _referenceEncoder.encodeForOS(codec, s);
201213
}
202214

203215
/** {@inheritDoc} */
216+
@Override
204217
public String encodeForLDAP(String s) {
205218
return _referenceEncoder.encodeForLDAP(s);
206219
}
207220

208221
/** {@inheritDoc} */
222+
@Override
209223
public String encodeForLDAP(String s, boolean b) {
210224
return _referenceEncoder.encodeForLDAP(s, b);
211225
}
212226

213227
/** {@inheritDoc} */
228+
@Override
214229
public String encodeForDN(String s) {
215230
return _referenceEncoder.encodeForDN(s);
216231
}
217232

218233
/** {@inheritDoc} */
234+
@Override
219235
public String encodeForXPath(String s) {
220236
return _referenceEncoder.encodeForXPath(s);
221237
}
222238

223239
/** {@inheritDoc} */
240+
@Override
224241
public String encodeForXML(String s) {
225242
return Encode.forXml(s);
226243
}
227244

228245
/** {@inheritDoc} */
246+
@Override
229247
public String encodeForXMLAttribute(String s) {
230248
return Encode.forXmlAttribute(s);
231249
}
232250

233251
/** {@inheritDoc} */
252+
@Override
234253
public String encodeForURL(String s) throws EncodingException {
235254
return Encode.forUri(s);
236255
}
237256

238257
/** {@inheritDoc} */
258+
@Override
239259
public String decodeFromURL(String s) throws EncodingException {
240260
return _referenceEncoder.decodeFromURL(s);
241261
}
242262

243263
/** {@inheritDoc} */
264+
@Override
244265
public String encodeForBase64(byte[] bytes, boolean wrap) {
245266
return _referenceEncoder.encodeForBase64(bytes, wrap);
246267
}
247268

248269
/** {@inheritDoc} */
270+
@Override
249271
public byte[] decodeFromBase64(String s) throws IOException {
250272
return _referenceEncoder.decodeFromBase64(s);
251273
}
252274

275+
/** {@inheritDoc} */
276+
@Override
277+
public String encodeForJSON(String s) {
278+
return _referenceEncoder.encodeForJSON(s);
279+
}
280+
281+
/** {@inheritDoc} */
282+
@Override
283+
public String decodeFromJSON(String s) {
284+
return _referenceEncoder.decodeFromJSON(s);
285+
}
286+
253287
}
254288
}

0 commit comments

Comments
 (0)