diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-06-17 09:40:06 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-06-17 09:40:06 -0300 |
commit | e41ab9aa320b4e64a8b99271bb7d3d094da59d56 (patch) | |
tree | 698dd841812af499c2159f8df5d4cf3083b555d4 /usr/local/pkg | |
parent | ee4ba9fba1f9d49396f3a4882a3239a83c5036d6 (diff) | |
download | pfsense-e41ab9aa320b4e64a8b99271bb7d3d094da59d56.zip pfsense-e41ab9aa320b4e64a8b99271bb7d3d094da59d56.tar.gz |
Escape parameters passed to shell_exec()
Diffstat (limited to 'usr/local/pkg')
-rw-r--r-- | usr/local/pkg/openntpd.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/pkg/openntpd.inc b/usr/local/pkg/openntpd.inc index c4914b8..dcbb50a 100644 --- a/usr/local/pkg/openntpd.inc +++ b/usr/local/pkg/openntpd.inc @@ -21,7 +21,7 @@ EOD; function openntpd_get_iface_ip($iface) { $iface = convert_friendly_interface_to_real_interface_name($iface); - $line = trim(shell_exec("ifconfig $iface | grep inet | grep -v inet6")); + $line = trim(shell_exec("ifconfig " . escapeshellarg($iface) . " | grep inet | grep -v inet6")); list($dummy, $ip, $dummy2, $dummy3) = explode(' ', $line); return $ip; |