mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Do not support relative static resource paths
Closes gh-33687
This commit is contained in:
+1
@@ -643,6 +643,7 @@ class ResourceHttpRequestHandlerTests {
|
||||
testInvalidPath("../testsecret/secret.txt");
|
||||
testInvalidPath("test/../../testsecret/secret.txt");
|
||||
testInvalidPath(":/../../testsecret/secret.txt");
|
||||
testInvalidPath("/testsecret/test/../secret.txt");
|
||||
|
||||
Resource location = new UrlResource(ResourceHttpRequestHandlerTests.class.getResource("./test/"));
|
||||
this.handler.setLocations(List.of(location));
|
||||
|
||||
Reference in New Issue
Block a user