Ignore URL arguments when checking directory
This commit is contained in:
parent
7f931b77f7
commit
4532d43aeb
@ -1191,7 +1191,7 @@ $EXT2MIME = [
|
|||||||
"ice" => "x-conference/x-cooltalk",
|
"ice" => "x-conference/x-cooltalk",
|
||||||
];
|
];
|
||||||
|
|
||||||
$path = $_SERVER['REQUEST_URI'];
|
$path = explode('?', $_SERVER['REQUEST_URI'], 2)[0];
|
||||||
$dir = realpath(__DIR__ . $path);
|
$dir = realpath(__DIR__ . $path);
|
||||||
if (strpos($dir, $ROOTPATH) !== 0) {
|
if (strpos($dir, $ROOTPATH) !== 0) {
|
||||||
die("Access denied.");
|
die("Access denied.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user