使用用于 CWE-113 修复的 ESAPI HTTPUtilities 进行重定向时出错

问题描述 投票:0回答:1

使用 ESAPI 重定向到另一个网址时出现以下错误。因此,我无法解决 CWE-113 问题。有人可以帮忙吗?

<pre>org.owasp.esapi.errors.ConfigurationException: SecurityConfiguration for HttpUtilities.maxRedirectLength has incorrect type</pre><h3>Processing Info:</h3>
下面是我的代码和依赖项。

我通过注释之前的代码尝试了下面的代码来修复 CWE-113。

//response.sendRedirect(homeUrl);

ESAPI.httpUtilities().setCurrentHTTP(request,response);

try {

   ESAPI.httpUtilities().sendRedirect(myURL);

} catch (AccessControlException e) {

   throw new RuntimeException(e);
} ESAPI.httpUtilities().clearCurrent();

org.owasp.esapi

esapi

2.2.3.1

aem veracode esapi
1个回答
0
投票

这是一个因问题而心慌意乱而错过明显解决方案的例子:

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

ESAPI.properties
中有一个键/值映射,其中键是
HttpUtilities.maxRedirectLength

您有一个配置异常,它应该始终指向

ESAPI.properties
validation.properties

您收到的警告是该值的类型不正确。可能有文本或值为空。但简而言之,就是这样。

© www.soinside.com 2019 - 2024. All rights reserved.