diff --git a/etc/inc/ipsec.attributes.php b/etc/inc/ipsec.attributes.php index e30fc4cfb5..ae7a85cf52 100644 --- a/etc/inc/ipsec.attributes.php +++ b/etc/inc/ipsec.attributes.php @@ -177,7 +177,7 @@ $rules = parse_cisco_acl($attributes); if (!empty($rules)) { $pid = posix_getpid(); @file_put_contents("/tmp/ipsec_{$pid}{$common_name}.rules", $rules); - mwexec("/sbin/pfctl -a \"ipsec/" . escapeshellarg($common_name) . "\" -f {$g['tmp_path']}/ipsec_{$pid}" . escapeshellarg($common_name) . ".rules"); + mwexec("/sbin/pfctl -a " . escapeshellarg("ipsec/{$common_name}") . " -f {$g['tmp_path']}/ipsec_{$pid}" . escapeshellarg($common_name) . ".rules"); @unlink("{$g['tmp_path']}/ipsec_{$pid}{$common_name}.rules"); } diff --git a/etc/inc/openvpn.attributes.php b/etc/inc/openvpn.attributes.php index 31ec7f5240..942a8d80ec 100644 --- a/etc/inc/openvpn.attributes.php +++ b/etc/inc/openvpn.attributes.php @@ -179,7 +179,7 @@ $rules = parse_cisco_acl($attributes); if (!empty($rules)) { $pid = posix_getpid(); @file_put_contents("/tmp/ovpn_{$pid}{$common_name}.rules", $rules); - mwexec("/sbin/pfctl -a \"openvpn/" . escapeshellarg($common_name) . "\" -f {$g['tmp_path']}/ovpn_{$pid}" . escapeshellarg($common_name) . ".rules"); + mwexec("/sbin/pfctl -a " . escapeshellarg("openvpn/{$common_name}") . " -f {$g['tmp_path']}/ovpn_{$pid}" . escapeshellarg($common_name) . ".rules"); @unlink("{$g['tmp_path']}/ovpn_{$pid}{$common_name}.rules"); } diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index b727abea09..59eb28d176 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -279,7 +279,7 @@ function is_freebsd_pkg_installed($pkg) { if(!$pkg) return; $output = ""; - exec("/usr/local/sbin/pbi_info \"" . escapeshellarg($pkg) . "\"", $output, $retval); + exec("/usr/local/sbin/pbi_info " . escapeshellarg($pkg), $output, $retval); return (intval($retval) == 0); } @@ -861,7 +861,7 @@ function install_package_xml($pkg) { $pkg_name_for_pbi_match = strtolower($pkg) . "-"; exec("/usr/local/sbin/pbi_info | grep '^{$pkg_name_for_pbi_match}' | xargs /usr/local/sbin/pbi_info | awk '/Prefix/ {print $2}'",$pbidirarray); $pbidir0 = $pbidirarray[0]; - exec("find /usr/local/etc/ -name *.conf | grep '" . escapeshellarg($pkg) . "'",$files); + exec("find /usr/local/etc/ -name *.conf | grep " . escapeshellarg($pkg),$files); foreach($files as $f) { $pbiconf = str_replace('/usr/local',$pbidir0,$f); if(is_file($pbiconf) || is_link($pbiconf)) { diff --git a/usr/local/www/diag_smart.php b/usr/local/www/diag_smart.php index 73f34057ad..d2309e64cb 100644 --- a/usr/local/www/diag_smart.php +++ b/usr/local/www/diag_smart.php @@ -85,7 +85,7 @@ function update_email($email) if(!empty($email)) { // Put it in the smartd.conf file - shell_exec("/usr/bin/sed -i old 's/^DEVICESCAN.*/DEVICESCAN -H -m " . escapeshellarg($email) . "/' /usr/local/etc/smartd.conf"); + shell_exec("/usr/bin/sed -i old 's/^DEVICESCAN.*/DEVICESCAN -H -m " . $email . "/' /usr/local/etc/smartd.conf"); } // Nope else