Skip to content

Commit

Permalink
Use correct method to check encoded resource path
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Popov authored and rstoyanchev committed Sep 20, 2024
1 parent 776811b commit 94c0482
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ else if (resource instanceof ClassPathResource 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 94c0482

Please sign in to comment.