summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_wol.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-02-04 12:33:29 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-02-04 12:47:20 -0200
commit1eb03024fe15fcd8cdd20f32a9ba7c7f1fb75821 (patch)
tree6c5186c0184447c633776c795c3f10553e3c3876 /usr/local/www/services_wol.php
parent46b12609e51b9b3113abc9c22a1b0ad5a2b37d11 (diff)
downloadpfsense-1eb03024fe15fcd8cdd20f32a9ba7c7f1fb75821.zip
pfsense-1eb03024fe15fcd8cdd20f32a9ba7c7f1fb75821.tar.gz
Add escapeshellarg() calls on exec parameters. While I'm here, replace some exec() calls by php functions like symlink, copy, unlink, mkdir
Conflicts: usr/local/www/diag_logs_vpn.php usr/local/www/firewall_aliases_edit.php usr/local/www/guiconfig.inc
Diffstat (limited to 'usr/local/www/services_wol.php')
-rwxr-xr-xusr/local/www/services_wol.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/services_wol.php b/usr/local/www/services_wol.php
index f60a792..6494a07 100755
--- a/usr/local/www/services_wol.php
+++ b/usr/local/www/services_wol.php
@@ -95,7 +95,7 @@ if ($_POST || $_GET['mac']) {
else {
$bcip = gen_subnet_max($ipaddr, get_interface_subnet($if));
/* Execute wol command and check return code. */
- if(!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}"))
+ if(!mwexec("/usr/local/bin/wol -i {$bcip} " . escapeshellarg($mac)))
$savemsg .= sprintf(gettext("Sent magic packet to %s."),$mac);
else
$savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s did not complete successfully%4$s'),'<a href="/diag_logs.php">', '</a>', $mac, ".<br>");
OpenPOWER on IntegriCloud