Révision 52c67bc2
Ajouté par jim-p il y a plus de 9 ans
etc/inc/services.inc | ||
---|---|---|
1741 | 1741 |
|
1742 | 1742 |
if ($config['dnsmasq']['custom_options']) |
1743 | 1743 |
foreach (preg_split('/\s+/', $config['dnsmasq']['custom_options']) as $c) { |
1744 |
$args .= " --$c";
|
|
1744 |
$args .= " " . escapeshellarg("--{$c}");
|
|
1745 | 1745 |
$p = explode('=', $c); |
1746 | 1746 |
if (array_key_exists($p[0], $standard_args)) |
1747 | 1747 |
unset($standard_args[$p[0]]); |
usr/local/www/services_dnsmasq.php | ||
---|---|---|
101 | 101 |
if ($config['dnsmasq']['custom_options']) { |
102 | 102 |
$args = ''; |
103 | 103 |
foreach (preg_split('/\s+/', $config['dnsmasq']['custom_options']) as $c) |
104 |
$args .= "--$c ";
|
|
104 |
$args .= escapeshellarg("--{$c}") . " ";
|
|
105 | 105 |
exec("/usr/local/sbin/dnsmasq --test $args", $output, $rc); |
106 | 106 |
if ($rc != 0) |
107 | 107 |
$input_errors[] = gettext("Invalid custom options"); |
Formats disponibles : Unified diff
Escape the individual dnsmasq advanced/custom options