Prevent Path Traversal

This commit is contained in:
seiichiro 2022-01-11 17:08:34 +01:00
parent 2506b5b6f0
commit fb9ef8ecd3

View file

@ -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_basedir);
print_r($r_imagedir); print_r($r_imagedir);
print "Path Traversal Detected!"; print "Path Traversal Detected!";
exit(); exit();