Skip to content

fix: update esapi #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion esapi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>org.owasp.esapi</groupId>
<artifactId>esapi</artifactId>
<version>[2.2.3.1,3)</version>
<version>[2.5.1.0,3)</version>
</dependency>
</dependencies>
</project>
34 changes: 34 additions & 0 deletions esapi/src/main/java/org/owasp/encoder/esapi/ESAPIEncoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,114 +141,148 @@ private enum Impl implements Encoder {
private final Encoder _referenceEncoder = DefaultEncoder.getInstance();

/** {@inheritDoc} */
@Override
public String canonicalize(String s) {
return _referenceEncoder.canonicalize(s);
}

/** {@inheritDoc} */
@Override
public String canonicalize(String s, boolean strict) {
return _referenceEncoder.canonicalize(s, strict);
}

/** {@inheritDoc} */
@Override
public String canonicalize(String s, boolean restrictMultiple, boolean restrictMixed) {
return _referenceEncoder.canonicalize(s, restrictMultiple, restrictMixed);
}

/** {@inheritDoc} */
@Override
public String getCanonicalizedURI(URI dirtyUri) {
return _referenceEncoder.getCanonicalizedURI(dirtyUri);
}

/** {@inheritDoc} */
@Override
public String encodeForCSS(String s) {
return Encode.forCssString(s);
}

/** {@inheritDoc} */
@Override
public String encodeForHTML(String s) {
return Encode.forHtml(s);
}

/** {@inheritDoc} */
@Override
public String decodeForHTML(String s) {
return _referenceEncoder.decodeForHTML(s);
}

/** {@inheritDoc} */
@Override
public String encodeForHTMLAttribute(String s) {
return Encode.forHtmlAttribute(s);
}

/** {@inheritDoc} */
@Override
public String encodeForJavaScript(String s) {
return Encode.forJavaScript(s);
}

/** {@inheritDoc} */
@Override
public String encodeForVBScript(String s) {
return _referenceEncoder.encodeForVBScript(s);
}

/** {@inheritDoc} */
@Override
public String encodeForSQL(Codec codec, String s) {
return _referenceEncoder.encodeForSQL(codec, s);
}

/** {@inheritDoc} */
@Override
public String encodeForOS(Codec codec, String s) {
return _referenceEncoder.encodeForOS(codec, s);
}

/** {@inheritDoc} */
@Override
public String encodeForLDAP(String s) {
return _referenceEncoder.encodeForLDAP(s);
}

/** {@inheritDoc} */
@Override
public String encodeForLDAP(String s, boolean b) {
return _referenceEncoder.encodeForLDAP(s, b);
}

/** {@inheritDoc} */
@Override
public String encodeForDN(String s) {
return _referenceEncoder.encodeForDN(s);
}

/** {@inheritDoc} */
@Override
public String encodeForXPath(String s) {
return _referenceEncoder.encodeForXPath(s);
}

/** {@inheritDoc} */
@Override
public String encodeForXML(String s) {
return Encode.forXml(s);
}

/** {@inheritDoc} */
@Override
public String encodeForXMLAttribute(String s) {
return Encode.forXmlAttribute(s);
}

/** {@inheritDoc} */
@Override
public String encodeForURL(String s) throws EncodingException {
return Encode.forUri(s);
}

/** {@inheritDoc} */
@Override
public String decodeFromURL(String s) throws EncodingException {
return _referenceEncoder.decodeFromURL(s);
}

/** {@inheritDoc} */
@Override
public String encodeForBase64(byte[] bytes, boolean wrap) {
return _referenceEncoder.encodeForBase64(bytes, wrap);
}

/** {@inheritDoc} */
@Override
public byte[] decodeFromBase64(String s) throws IOException {
return _referenceEncoder.decodeFromBase64(s);
}

/** {@inheritDoc} */
@Override
public String encodeForJSON(String s) {
return _referenceEncoder.encodeForJSON(s);
}

/** {@inheritDoc} */
@Override
public String decodeFromJSON(String s) {
return _referenceEncoder.decodeFromJSON(s);
}

}
}
6 changes: 0 additions & 6 deletions esapi/src/test/resources/esapi-java-logging.properties

This file was deleted.