Do not warn against Root Servlet context location

Closes gh-36693
This commit is contained in:
Brian Clozel
2026-05-05 11:54:02 +02:00
parent b8ddd2c690
commit c6b485c31d
2 changed files with 0 additions and 8 deletions
@@ -75,10 +75,6 @@ public abstract class ResourceHandlerUtils {
}
else if (location instanceof ContextResource contextResource) {
path = contextResource.getPathWithinContext();
if ("/".equals(path)) {
logger.warn("Resource location '" + location + "' is considered unsafe " +
"and should not be used as it provides access to the root servlet context.");
}
}
else if (location instanceof UrlResource) {
path = location.getURL().toExternalForm();
@@ -76,10 +76,6 @@ public abstract class ResourceHandlerUtils {
}
else if (location instanceof ContextResource contextResource) {
path = contextResource.getPathWithinContext();
if ("/".equals(path)) {
logger.warn("Resource location '" + location + "' is considered unsafe " +
"and should not be used as it provides access to the root servlet context.");
}
}
else if (location instanceof UrlResource) {
path = location.getURL().toExternalForm();