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

@ -7,14 +7,15 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Header
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_weblog.html');
$v_domain = $_GET['domain'];
$v_domain = escapeshellarg($_GET['domain']);
if ($_GET['type'] == 'access') $type = 'access';
if ($_GET['type'] == 'error') $type = 'error';
$return_var = v_exec("v-list-web-domain-{$type}log", [$user, $v_domain], false, $output);
exec (VESTA_CMD."v-list-web-domain-".$type."log $user ".$v_domain, $output, $return_var);
if ($return_var == 0) {
print $output . "\n";
if ($return_var == 0 ) {
foreach($output as $file) {
echo $file . "\n";
}
}
echo " </pre>\n</body>\n</html>\n";