coheigea opened a new pull request, #3801: URL: https://github.com/apache/cxf/pull/3801
#3626 made AbstractHTTPServlet refuse static resources and redirects under /WEB-INF/ and /META-INF/, but checked the raw pathInfo. redirect() only collapsed "//" afterwards, when building the dispatch path, so "//WEB-INF/views/admin.jsp" passed the check and was forwarded to "/WEB-INF/views/admin.jsp" on containers that don't merge slashes. serveStaticContent() had the same gap. Add UrlUtils.normalizePath, which collapses empty and "." segments and returns null for a path with a ".." segment, a backslash or a NUL. AbstractHTTPServlet now normalizes first and uses the same path for the protected-path check, the resource lookup and the RequestDispatcher. SwaggerUiResourceLocator.isTraversal uses it in place of its own ".."/backslash check. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
