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:34:42 -0200
commitd31ca3363dcb7b243f71118744123a5ba71665cb (patch)
treed9478b15b7a4316a10b7a9b5d4a415c272285a1c /usr/local/www/services_wol.php
parent39ed87e54d14af2603cc66e65ac5e13a9c9843b1 (diff)
downloadpfsense-d31ca3363dcb7b243f71118744123a5ba71665cb.zip
pfsense-d31ca3363dcb7b243f71118744123a5ba71665cb.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 '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