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 RxL-Deepak-Agrawal committed Nov 26, 2024
1 parent 8686485 commit 21fe6cf
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 21fe6cf

Please sign in to comment.