Skip to content

Commit

Permalink
Fix directory traversal security checking
Browse files Browse the repository at this point in the history
fixes #7015
  • Loading branch information
quickapps committed Jul 15, 2015
1 parent c4031bf commit 92e3e09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Network/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ public function file($path, array $options = [])
'download' => null
];

if (strpos($path, '..') !== false) {
if (strpos(dirname($path), '..') !== false) {
throw new NotFoundException('The requested file contains `..` and will not be read.');
}

Expand Down

0 comments on commit 92e3e09

Please sign in to comment.