Browse Source

Merge pull request #7021 from quickapps/master

More accurate directory traversal security checking
Anto 10 years ago
parent
commit
69e5226fd2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Network/Response.php

+ 1 - 1
src/Network/Response.php

@@ -1419,7 +1419,7 @@ class Response
             'download' => null
         ];
 
-        if (strpos($path, '..') !== false) {
+        if (strpos(dirname($path), '..') !== false) {
             throw new NotFoundException('The requested file contains `..` and will not be read.');
         }