0

我正在将 esapi 安全过滤器应用于我的应用程序,正在使用 conf.properties 文件中的属性启用/禁用此安全过滤器。禁用时它工作正常,但启用时我无法访问我的应用程序这是我的一段代码:

    如果(this.owaspSecurityEnabled)
    {

                // 这在每次调用时都是必需的
                ESAPI.httpUtilities().setCurrentHTTP(servletRequest, servletResponse);

                // doFilter 通过包装请求和响应
                // ESAPI 安全的 HttpServletRequest 和 HttpServletResponse  
                请求 = 新的 SecurityWrapperRequest(servletRequest);
                响应 = 新的 SecurityWrapperResponse(servletResponse);
    }

我已经调试了这个问题,但无法解决。启用 request.getPathInfo() 为“”,禁用时返回路径。

如何解决这个问题,请帮助我。提前谢谢。

4

1 回答 1

1

Found solution to my problem, It is with the regrular expresion in espai.properties file

"Validator.HTTPPath=^[a-zA-Z0-9.\\-_]*$" changed to "Validator.HTTPPath=^[a-zA-Z0-9.\\-_\/]*$"

Thanks..

于 2014-10-08T12:24:11.683 回答