From 071f6059996bdb9d9d0a68082a14dc71c0fbabe6 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 6 Aug 2014 15:26:41 -0400 Subject: Escape the individual dnsmasq advanced/custom options --- usr/local/www/services_dnsmasq.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/services_dnsmasq.php b/usr/local/www/services_dnsmasq.php index 5c39178..7733f00 100644 --- a/usr/local/www/services_dnsmasq.php +++ b/usr/local/www/services_dnsmasq.php @@ -101,7 +101,7 @@ if ($_POST) { if ($config['dnsmasq']['custom_options']) { $args = ''; foreach (preg_split('/\s+/', $config['dnsmasq']['custom_options']) as $c) - $args .= "--$c "; + $args .= escapeshellarg("--{$c}") . " "; exec("/usr/local/sbin/dnsmasq --test $args", $output, $rc); if ($rc != 0) $input_errors[] = gettext("Invalid custom options"); -- cgit v1.1