Expand my Community achievements bar.

Error while redirecting using ESAPI HTTPUtilities

Avatar

Level 2

Hi Everyone,

I am getting below error while redirecting to another url using ESAPI . I am unable to resolve CWE-113 issues due to this. could anyone please help.

 

<pre>org.owasp.esapi.errors.ConfigurationException: SecurityConfiguration for HttpUtilities.maxRedirectLength has incorrect type</pre><h3>Processing Info:</h3>

Below are my code and dependencies.

 

ESAPI.httpUtilities().setCurrentHTTP(request,response);
try {
ESAPI.httpUtilities().sendRedirect(myURL);
} catch (AccessControlException e) {
throw new RuntimeException(e);
}
ESAPI.httpUtilities().clearCurrent();

 

<dependency>
<groupId>org.owasp.esapi</groupId>
<artifactId>esapi</artifactId>
<version>2.2.3.1</version>
</dependency> 

 

1 Reply

Avatar

Community Advisor

Hi, 


The error suggests that you don't set the "maxRedirectLength" property, please check this: https://github.com/VascoArreaza/OwaspJava/blob/master/esapi-java-legacy-develop/configuration/esapi/... 

 

Hope this helps.



Esteban Bustamante