Skip to content

Commit 21fe6cf

Browse files
Andrey PopovRxL-Deepak-Agrawal
authored andcommitted
Use correct method to check encoded resource path
Closes: spring-projectsgh-33568 (cherry picked from commit 94c0482)
1 parent 8686485 commit 21fe6cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-webflux/src/main/java/org/springframework/web/reactive/function/server/PathResourceLookupFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ else if (resource instanceof ClassPathResource) {
213213
return true;
214214
}
215215
locationPath = (locationPath.endsWith("/") || locationPath.isEmpty() ? locationPath : locationPath + "/");
216-
return (resourcePath.startsWith(locationPath) && !isInvalidEncodedInputPath(resourcePath));
216+
return (resourcePath.startsWith(locationPath) && !isInvalidEncodedResourcePath(resourcePath));
217217
}
218218

219219
private boolean isInvalidEncodedResourcePath(String resourcePath) {

0 commit comments

Comments
 (0)