Suppress decoding error for resource path

Closes gh-23463
This commit is contained in:
Rossen Stoyanchev
2019-08-21 10:02:15 +03:00
parent b86c11cc9b
commit 6d8bf3466c
8 changed files with 36 additions and 14 deletions

View File

@@ -109,6 +109,13 @@ public class PathResourceResolverTests {
assertNull(actual);
}
@Test // gh-23463
public void ignoreInvalidEscapeSequence() throws IOException {
UrlResource location = new UrlResource(getClass().getResource("./test/"));
Resource resource = location.createRelative("test%file.txt");
assertTrue(this.resolver.checkResource(resource, location));
}
@Test
public void checkResourceWithAllowedLocations() {
this.resolver.setAllowedLocations(