diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-02-14 22:14:05 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-02-14 22:14:05 +0000 |
commit | 667889e740b5356a6153ac48e14357b6b2d98737 (patch) | |
tree | 1cd10d02e8ea55e58ddf1527b44a15d08b98ce3e | |
parent | eb5814ae59f005f403d2a6b36798675351383961 (diff) | |
download | pfsense-667889e740b5356a6153ac48e14357b6b2d98737.zip pfsense-667889e740b5356a6153ac48e14357b6b2d98737.tar.gz |
Close off XSS execution hole.
Submitted-by: Charles Hooper
-rwxr-xr-x | usr/local/www/diag_dump_states.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr/local/www/diag_dump_states.php b/usr/local/www/diag_dump_states.php index 74bec09..4d33dce 100755 --- a/usr/local/www/diag_dump_states.php +++ b/usr/local/www/diag_dump_states.php @@ -31,11 +31,16 @@ require_once("guiconfig.inc"); $pgtitle = "Diagnostics: Show States"; include("head.inc"); +$srcip = htmlentities($_GET['srcip']); +$dstip = htmlentities($_GET['dstip']); +$action = htmlentities($_GET['action']); +$filter = htmlentities($_GET['filter']); + /* handle AJAX operations */ if($_GET['action']) { - if($_GET['action'] == "remove") { - $retval = mwexec("/sbin/pfctl -k '{$_GET['srcip']}' -k '{$_GET['dstip']}'"); - echo "|{$_GET['srcip']}|{$_GET['dstip']}|{$retval}|"; + if($action == "remove") { + $retval = mwexec("/sbin/pfctl -k '{$srcip}' -k '{$dstip}'"); + echo "|{$srcip}|{$dstip}|{$retval}|"; exit; } } |