Improve static resource path check

This commit is contained in:
Rossen Stoyanchev
2016-06-28 15:39:19 -04:00
parent 4c87167c98
commit 269742589b

View File

@@ -371,7 +371,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
return true; return true;
} }
} }
if (path.contains("../")) { if (path.contains("..")) {
path = StringUtils.cleanPath(path); path = StringUtils.cleanPath(path);
if (path.contains("../")) { if (path.contains("../")) {
if (logger.isTraceEnabled()) { if (logger.isTraceEnabled()) {