Skip to content

Commit

Permalink
Use correct method to check encoded resource path
Browse files Browse the repository at this point in the history
Closes: spring-projectsgh-33568
(cherry picked from commit 94c0482)
  • Loading branch information
Andrey Popov authored and cesarhernandezgt committed Oct 30, 2024
1 parent 99be4f5 commit 302edca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ else if (resource instanceof ClassPathResource) {
return true;
}
locationPath = (locationPath.endsWith("/") || locationPath.isEmpty() ? locationPath : locationPath + "/");
return (resourcePath.startsWith(locationPath) && !isInvalidEncodedInputPath(resourcePath));
return (resourcePath.startsWith(locationPath) && !isInvalidEncodedResourcePath(resourcePath));
}

private boolean isInvalidEncodedResourcePath(String resourcePath) {
Expand Down

0 comments on commit 302edca

Please sign in to comment.