summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_dump_states.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-14 22:14:00 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-14 22:14:00 +0000
commit695b058058f5fe5a588c4d06a188962f20a74725 (patch)
tree77720e2a88ab450ee525c25f9cc9dd5bf7a408cc /usr/local/www/diag_dump_states.php
parentc147cd0ea6565add9fded941bebae7a7fa926863 (diff)
downloadpfsense-695b058058f5fe5a588c4d06a188962f20a74725.zip
pfsense-695b058058f5fe5a588c4d06a188962f20a74725.tar.gz
Close off XSS execution hole.
Submitted-by: Charles Hooper
Diffstat (limited to 'usr/local/www/diag_dump_states.php')
-rwxr-xr-xusr/local/www/diag_dump_states.php11
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 c368366..fffdc2b 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 = array("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;
}
}
OpenPOWER on IntegriCloud