Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/394.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用ESAPI sendRedirect修复openRedirect,但不在Java中工作?_Java_Security_Fortify_Esapi - Fatal编程技术网

使用ESAPI sendRedirect修复openRedirect,但不在Java中工作?

使用ESAPI sendRedirect修复openRedirect,但不在Java中工作?,java,security,fortify,esapi,Java,Security,Fortify,Esapi,我正在尝试修复Java代码中报告的开放重定向问题。我目前使用的代码是: response.sendRedirect(request.getRequestUrl().toString()) 我使用过ESAPI,但不知为什么它没有重定向到所需的servlet。我使用的ESAPI如下所示: ESAPI.httpUtilities().setCurrentHTTP(req, resp); ESAPI.httpUtilities().sendRedirect(location); ESAPI.httpUt

我正在尝试修复Java代码中报告的开放重定向问题。我目前使用的代码是:
response.sendRedirect(request.getRequestUrl().toString())

我使用过ESAPI,但不知为什么它没有重定向到所需的servlet。我使用的ESAPI如下所示:

ESAPI.httpUtilities().setCurrentHTTP(req, resp);
ESAPI.httpUtilities().sendRedirect(location);
ESAPI.httpUtilities().clearCurrent();
已成功上载ESAPI.properties和Validator.properties。我还对ESAPI.properties进行了更改,用我的应用程序名替换了test,如下所示:
Validator.Redirect=“^/*$”

我的应用程序的示例URL是
https:\\localhost\\com\sos\servlet\Login


有人能告诉我我遗漏了什么或我做错了什么吗?

调试它时,
位置的值是多少?
?我在位置https:\\localhost\\servlet\com.sos.servlet.Login?SessionID=其中Login.java是servlet名称