diff --git a/usr/local/www/diag_dump_states.php b/usr/local/www/diag_dump_states.php index 6b5388ae4c..40ab24bbba 100755 --- a/usr/local/www/diag_dump_states.php +++ b/usr/local/www/diag_dump_states.php @@ -43,23 +43,21 @@ require_once("guiconfig.inc"); require_once("interfaces.inc"); /* handle AJAX operations */ -if($_GET['action']) { - if($_GET['action'] == "remove") { - if (is_ipaddr($_GET['srcip']) and is_ipaddr($_GET['dstip'])) { - $retval = mwexec("/sbin/pfctl -k " . escapeshellarg($_GET['srcip']) . " -k " . escapeshellarg($_GET['dstip'])); - echo htmlentities("|{$_GET['srcip']}|{$_GET['dstip']}|{$retval}|"); - } else { - echo gettext("invalid input"); - } - return; +if(isset($_POST['action']) && $_POST['action'] == "remove") { + if (isset($_POST['srcip']) && isset($_POST['dstip']) && is_ipaddr($_POST['srcip']) && is_ipaddr($_POST['dstip'])) { + $retval = mwexec("/sbin/pfctl -k " . escapeshellarg($_POST['srcip']) . " -k " . escapeshellarg($_POST['dstip'])); + echo htmlentities("|{$_POST['srcip']}|{$_POST['dstip']}|{$retval}|"); + } else { + echo gettext("invalid input"); } + return; } -if ($_GET['filter'] && ($_GET['killfilter'] == "Kill")) { - if (is_ipaddr($_GET['filter'])) { - $tokill = escapeshellarg($_GET['filter'] . "/32"); - } elseif (is_subnet($_GET['filter'])) { - $tokill = escapeshellarg($_GET['filter']); +if (isset($_POST['filter']) && isset($_POST['killfilter'])) { + if (is_ipaddr($_POST['filter'])) { + $tokill = escapeshellarg($_POST['filter'] . "/32"); + } elseif (is_subnet($_POST['filter'])) { + $tokill = escapeshellarg($_POST['filter']); } else { // Invalid filter $tokill = ""; @@ -90,9 +88,16 @@ include("head.inc"); jQuery('img[name="i:' + srcip + ":" + dstip + '"]').each(busy); jQuery.ajax( - "" + - "?action=remove&srcip=" + srcip + "&dstip=" + dstip, - { type: "get", complete: removeComplete } + "", + { + type: "post", + data: { + action: "remove", + srcip: srcip, + dstip: dstip + }, + complete: removeComplete + } ); } @@ -136,7 +141,7 @@ include("head.inc");
-
+ @@ -171,7 +176,7 @@ include("head.inc"); = 10000) @@ -227,7 +232,7 @@ pclose($fd);
@@ -144,9 +149,9 @@ include("head.inc"); - + " /> - + " />
- + :