Browse Source

Fix directory traversal security checking

fixes #7015
QuickApps 10 years ago
parent
commit
92e3e09fdc
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.');
         }