Revert "[SECURITY] Fix OS command injection."

This commit is contained in:
Serghey Rodin 2015-12-11 21:14:49 +02:00
commit 39e9b6397b
115 changed files with 1980 additions and 1340 deletions

View file

@ -1,4 +1,4 @@
<?php
<?php
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
@ -16,11 +16,11 @@ if (!empty($_REQUEST['path'])) {
$path = $_REQUEST['path'];
if (!empty($_REQUEST['raw'])) {
header('content-type: image/jpeg');
// TODO: Implement `v_passthru`?
passthru(VESTA_CMD.'v-open-fs-file '.build_shell_args([$user, $_REQUEST['path']]));
passthru (VESTA_CMD . "v-open-fs-file " . $user . " " . escapeshellarg($_REQUEST['path']));
exit;
}
} else {
}
else {
die('File not found');
}