🔒 ♻️ 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

@ -8,14 +8,15 @@ if (empty($argv[1])) {
$options = getopt("s:f:");
require_once(__DIR__.'/exec.php');
define('NO_AUTH_REQUIRED',true);
define('NO_AUTH_REQUIRED', true);
include("/usr/local/vesta/web/inc/main.php");
// Set system language
exec (VESTA_CMD . "v-list-sys-config json", $output, $return_var);
$data = json_decode(implode('', $output), true);
if (!empty( $data['config']['LANGUAGE'])) {
v_exec('v-list-sys-config', ['json'], false, $output);
$data = json_decode($output, true);
if (!empty($data['config']['LANGUAGE'])) {
$_SESSION['language'] = $data['config']['LANGUAGE'];
} else {
$_SESSION['language'] = 'en';