Skip to content

Commit 23a2b76

Browse files
committed
Added Javadoc to encodeForSQL method regarding how to enabled it.
1 parent 0129740 commit 23a2b76

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/org/owasp/esapi/Encoder.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,19 @@ public interface Encoder {
470470
* OWASP SQL Injection Prevention Cheat Sheet</a>. If you allow this, we recommend only
471471
* doing so for a limited time duration and in the meantime creating some sort of security
472472
* exception ticket to track it.
473+
* </p><p>
474+
* <b>IMPORTANT NOTE:</b> If you really do insist enabling leg cannon mode and use
475+
* this method, then you <i>MUST<i> follow these instructions. Failure to do so will
476+
* result in a {@link org.owasp.esapi.errors.NotConfiguredByDefaultException} being
477+
* thrown when you try to call it. Thus to make it work, you need to add the implementation
478+
* method corresponding to this interace (defined in the property "<b>ESAPI.Encoder</b>"
479+
* (wihch defaults to "org.owasp.esapi.reference.DefaultEncoder") in your "<b>ESAPI.properties</b>" file,
480+
* to the ESAPI property "<b>ESAPI.dangerouslyAllowUnsafeMethods.methodNames</b>". See
481+
* the Security Bulletin #13 document referenced below for additional details.
473482
* </p>
474483
* @see <a href="https://download.oracle.com/otn-pub/jcp/jdbc-4_2-mrel2-spec/jdbc4.2-fr-spec.pdf">JDBC Specification</a>
475484
* @see <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/PreparedStatement.html">java.sql.PreparedStatement</a>
485+
* @see <a href="https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin13.pdf">ESAPI Security Bulletin #13</a>
476486
*
477487
* @param codec
478488
* a {@link org.owasp.esapi.codecs.Codec} that declares which database 'input' is being encoded for (ie. MySQL, Oracle, etc.)

0 commit comments

Comments
 (0)