使用 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();
这是一个因问题而心慌意乱而错过明显解决方案的例子:
<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
您收到的警告是该值的类型不正确。可能有文本或值为空。但简而言之,就是这样。