使用ESAPI sendRedirect修复openRedirect,但不在Java中工作?
我正在尝试修复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
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名称