mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 13:54:28 -07:00
🔒 ♻️ Implement secure exec
wrapper functions.
This commit is contained in:
parent
6e13036780
commit
8e951ac72e
115 changed files with 1345 additions and 1986 deletions
|
@ -14,20 +14,18 @@ top_panel($user,$TAB);
|
|||
|
||||
// Data
|
||||
if (empty($_GET['domain'])){
|
||||
exec (VESTA_CMD."v-list-dns-domains $user json", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
v_exec('v-list-dns-domains', [$user, 'json'], false, $output);
|
||||
$data = json_decode($output, true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_dns.html');
|
||||
} else {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_dns.html');
|
||||
}
|
||||
} else {
|
||||
exec (VESTA_CMD."v-list-dns-records '".$user."' '".escapeshellarg($_GET['domain'])."' 'json'", $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
v_exec('v-list-dns-records', [$user, $_GET['domain'], 'json'], false, $output);
|
||||
$data = json_decode($output, true);
|
||||
$data = array_reverse($data, true);
|
||||
unset($output);
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_dns_rec.html');
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue