Error while redirecting using ESAPI HTTPUtilities | Community
Skip to main content
Level 2
April 6, 2024
Question

Error while redirecting using ESAPI HTTPUtilities

  • April 6, 2024
  • 1 reply
  • 1059 views

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> 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 8, 2024

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/ESAPI.properties#L335C1-L335C36 

 

Hope this helps.

Esteban Bustamante