mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix some wrong escapeshellarg() calls
Conflicts: etc/inc/filter_log.inc etc/inc/pkg-utils.inc
This commit is contained in:
parent
af7a83737e
commit
b3cbb07729
@ -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");
|
||||
}
|
||||
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user