mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Do not warn against Root Servlet context location
Closes gh-36692
This commit is contained in:
-4
@@ -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();
|
||||
|
||||
-4
@@ -77,10 +77,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();
|
||||
|
||||
Reference in New Issue
Block a user