coheigea opened a new pull request, #3751: URL: https://github.com/apache/cxf/pull/3751
SwaggerUiResourceLocator.locate() appended the requested resource path to the Swagger UI root without checking it, so a path containing ".." segments could resolve to a file outside the root when Swagger UI is served from a file: location. Percent-encoded forms such as %2e%2e or %2F could also be decoded by the URL handler after the URL was built. The path is now percent-decoded until it no longer changes (using UrlUtils.pathDecode, so '+' is kept), and rejected with a MalformedURLException if it contains a ".." segment or a backslash, or has invalid percent-encoding. SwaggerUiService already turns that into a 404. File names that merely contain ".." are still allowed. -- 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]
