-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getResourcePaths fails when a META-INF resource has reserved characters in its filename #9972
Comments
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Draft PR #9974 opened for this issue. |
Signed-off-by: Ludovic Orban <[email protected]>
@wilkinsona thanks for the report, this turns out to be a very interesting test case as it uncovered a bug in the Jetty code base, as well as another one in the JDK itself! #9974 is the PR with the Jetty fix, it will be reviewed and merged very soon and should be enough for your example servlet to work as expected. #9978 is a merged PR that adds a disabled test to the Jetty codebase, referring to the JDK bug we filed and reproducing it. Let us know if you need more details. |
@wilkinsona the JDK bug is that ZIP/JAR resources accessed via string are normalized, an internal process that forces all backslashes This makes the use of The other characters in your input string This is not a problem if the filename |
#9972 Fix ServletContextApi.getResource* path normalization Signed-off-by: Ludovic Orban <[email protected]>
@wilkinsona a fix got merged to the Thanks for the report, btw! |
@lorban Thanks for fixing this so quickly. What's the best way for me to try a 12.0.0 snapshot? Are they published anywhere or would I need to build from source? |
@wilkinsona our nightly builds are published here: https://oss.sonatype.org/content/repositories/jetty-snapshots/ |
I just forced a build. It would be best if you waited the end of this Jenkins build https://jenkins.webtide.net/job/nightlies/job/jetty-12.0.x-snapshots-deploy/279/ |
Thanks, both. I've just tested 12.0.0-SNAPSHOT and the |
Jetty version(s)
12.0.0.beta2
Java version/vendor
(use: java -version)
OS type/version
macOS 13.4
Description
I'm in the process of upgrading Spring Boot to Jetty 12 and have encountered a problem that's similar to #4033 and #7160. The setup is similar too. There's a jar file that contains a resource named
META-INF/resources/nested-reserved-!#\\$%&()*+,:=?@[]-meta-inf-resource.txt
and a servlet that's used for testing:A request to this servlet fails:
The same test succeeds with Jetty 11.
The text was updated successfully, but these errors were encountered: