mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Execute pihole through wrapper
All different exec() calls basically just calls sudo pihole, with various different syntaxes. Using a wrapper function allows sanitization of arguments for better safety. Signed-off-by: Samu Voutilainen <smar@smar.fi>
This commit is contained in:
@@ -746,5 +746,6 @@ if ($_POST['action'] == 'get_groups') {
|
||||
}
|
||||
// Reload lists in pihole-FTL after having added something
|
||||
if ($reload) {
|
||||
echo shell_exec('sudo pihole restartdns reload-lists');
|
||||
$output = pihole_execute('restartdns reload-lists');
|
||||
echo implode("\n", $output);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user