🔒 ♻️ Implement secure exec wrapper functions.

This commit is contained in:
Flat 2015-12-02 21:24:34 +09:00
commit 8e951ac72e
115 changed files with 1345 additions and 1986 deletions

View file

@ -9,7 +9,7 @@ include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Check token
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
header('location: /login/');
exit();
exit;
}
$database = $_POST['database'];
@ -34,8 +34,7 @@ if ($_SESSION['user'] == 'admin') {
}
foreach ($database as $value) {
$value = escapeshellarg($value);
exec (VESTA_CMD.$cmd." ".$user." ".$value, $output, $return_var);
v_exec($cmd, [$user, $value], false);
}
header("Location: /list/db/");