diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-02-03 14:55:01 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-02-04 12:34:41 -0200 |
commit | 873c1701a8934ac9a10284fe794eb86db1cead68 (patch) | |
tree | f33e957b3983ada067702e87540caa3b273ea7e2 /etc/inc/ipsec.attributes.php | |
parent | 4f188f54abf44ebe82c317ceee7555c7bd00e7ba (diff) | |
download | pfsense-873c1701a8934ac9a10284fe794eb86db1cead68.zip pfsense-873c1701a8934ac9a10284fe794eb86db1cead68.tar.gz |
Add escapeshellarg() calls on exec parameters. While I'm here, replace some exec() calls by php functions like symlink, copy, unlink, mkdir
Diffstat (limited to 'etc/inc/ipsec.attributes.php')
-rw-r--r-- | etc/inc/ipsec.attributes.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/ipsec.attributes.php b/etc/inc/ipsec.attributes.php index 7e7ce2e..e30fc4c 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/{$common_name}\" -f {$g['tmp_path']}/ipsec_{$pid}{$common_name}.rules"); + mwexec("/sbin/pfctl -a \"ipsec/" . escapeshellarg($common_name) . "\" -f {$g['tmp_path']}/ipsec_{$pid}" . escapeshellarg($common_name) . ".rules"); @unlink("{$g['tmp_path']}/ipsec_{$pid}{$common_name}.rules"); } |