Prevent Path Traversal
This commit is contained in:
parent
2506b5b6f0
commit
fb9ef8ecd3
1 changed files with 2 additions and 1 deletions
|
@ -43,8 +43,9 @@ if (isset($_SESSION['files'])
|
|||
|
||||
|
||||
|
||||
if ($r_imagedir === false || strcmp($r_imagedir, $r_basedir . DIRECTORY_SEPARATOR) !== 0) {
|
||||
if ($r_imagedir === false || strpos($r_imagedir, $r_basedir . DIRECTORY_SEPARATOR) !== 0) {
|
||||
print_r($r_basedir);
|
||||
|
||||
print_r($r_imagedir);
|
||||
print "Path Traversal Detected!";
|
||||
exit();
|
||||
|
|
Loading…
Reference in a new issue