Skip to content

Commit 2697425

Browse files
committed
Improve static resource path check
1 parent 4c87167 commit 2697425

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ protected boolean isInvalidPath(String path) {
371371
return true;
372372
}
373373
}
374-
if (path.contains("../")) {
374+
if (path.contains("..")) {
375375
path = StringUtils.cleanPath(path);
376376
if (path.contains("../")) {
377377
if (logger.isTraceEnabled()) {

0 commit comments

Comments
 (0)