From c88494af6b8a845218030028fd424f7eb048cd69 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Wed, 2 Apr 2014 15:24:03 -0400 Subject: Use $_POST for config changes and add misc fixes and improvements. --- config/snort/snort_interfaces_suppress.php | 44 +++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'config/snort/snort_interfaces_suppress.php') diff --git a/config/snort/snort_interfaces_suppress.php b/config/snort/snort_interfaces_suppress.php index e42b7f8c..216b93c6 100644 --- a/config/snort/snort_interfaces_suppress.php +++ b/config/snort/snort_interfaces_suppress.php @@ -46,7 +46,6 @@ if (!is_array($config['installedpackages']['snortglobal']['suppress']['item'])) $a_suppress = &$config['installedpackages']['snortglobal']['suppress']['item']; $id_gen = count($config['installedpackages']['snortglobal']['suppress']['item']); - function snort_suppresslist_used($supplist) { /****************************************************************/ @@ -69,14 +68,14 @@ function snort_suppresslist_used($supplist) { return false; } -if ($_GET['act'] == "del") { - if ($a_suppress[$_GET['id']]) { - /* make sure rule is not being referenced by any nat or filter rules */ - if (snort_suppresslist_used($a_suppress[$_GET['id']]['name'])) { - $input_errors[] = gettext("ERROR -- Suppress List is currently assigned to an interface and cannot be removed!"); +if ($_POST['del']) { + if ($a_suppress[$_POST['list_id']] && is_numericint($_POST['list_id'])) { + /* make sure list is not being referenced by any Snort interfaces */ + if (snort_suppresslist_used($a_suppress[$_POST['list_id']]['name'])) { + $input_errors[] = gettext("ERROR -- Suppress List is currently assigned to a Snort interface and cannot be removed! Unassign it from all Snort interfaces first."); } else { - unset($a_suppress[$_GET['id']]); + unset($a_suppress[$_POST['list_id']]); write_config(); header("Location: /snort/snort_interfaces_suppress.php"); exit; @@ -93,14 +92,16 @@ include_once("head.inc"); ' . $pgtitle . '

';} if ($input_errors) { print_input_errors($input_errors); } +if ($savemsg) + print_info_box($savemsg); ?> -
+ + @@ -137,15 +139,13 @@ if ($input_errors) { @@ -160,7 +160,7 @@ if ($input_errors) { + width="17" height="17" border="0" title="">
- - + +
">')">"> + ">');" + src="/themes//images/icons/icon_x.gif" width="17" height="17" border="0" + title=""/>
">
-- cgit v1.2.3