aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_interfaces_suppress_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-08-03 15:43:43 +0000
committerErmal <eri@pfsense.org>2011-08-03 15:43:43 +0000
commit8c0fcc9d45f382d5f171adaf5bba112b0172d566 (patch)
treecf91743acb85e4053a3ed65173df8b635d888848 /config/snort/snort_interfaces_suppress_edit.php
parent2e06535daadd598e700b5619ca08d935bd97146a (diff)
downloadpfsense-packages-8c0fcc9d45f382d5f171adaf5bba112b0172d566.tar.gz
pfsense-packages-8c0fcc9d45f382d5f171adaf5bba112b0172d566.tar.bz2
pfsense-packages-8c0fcc9d45f382d5f171adaf5bba112b0172d566.zip
Another round of fixes for whitelist and suppress. Also correct behaviour of some GUI.
Diffstat (limited to 'config/snort/snort_interfaces_suppress_edit.php')
-rw-r--r--config/snort/snort_interfaces_suppress_edit.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/config/snort/snort_interfaces_suppress_edit.php b/config/snort/snort_interfaces_suppress_edit.php
index bf916500..7303349f 100644
--- a/config/snort/snort_interfaces_suppress_edit.php
+++ b/config/snort/snort_interfaces_suppress_edit.php
@@ -52,8 +52,8 @@ if (!is_numeric($id))
$id = 0; // XXX: safety belt
-/* gen uuid for each iface !inportant */
-if (!is_array($config['installedpackages']['snortglobal']['suppress']['item'][$id])) {
+/* gen uuid for each iface */
+if (is_array($config['installedpackages']['snortglobal']['suppress']['item'][$id])) {
if ($config['installedpackages']['snortglobal']['suppress']['item'][$id]['uuid'] == '') {
//$snort_uuid = gen_snort_uuid(strrev(uniqid(true)));
$suppress_uuid = 0;
@@ -61,9 +61,7 @@ if (!is_array($config['installedpackages']['snortglobal']['suppress']['item'][$i
$suppress_uuid = mt_rand(1, 65535);
$pconfig['uuid'] = $suppress_uuid;
}
- }
-
- if ($config['installedpackages']['snortglobal']['suppress']['item'][$id]['uuid'] != '') {
+ } else if ($config['installedpackages']['snortglobal']['suppress']['item'][$id]['uuid'] != '') {
$suppress_uuid = $config['installedpackages']['snortglobal']['suppress']['item'][$id]['uuid'];
}
}
@@ -98,14 +96,14 @@ if ($_POST['submit']) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
if(strtolower($_POST['name']) == "defaultwhitelist")
- $input_errors[] = "Whitelist file names may not be named defaultwhitelist.";
+ $input_errors[] = "Whitelist file names may not be named defaultwhitelist.";
$x = is_validwhitelistname($_POST['name']);
if (!isset($x)) {
$input_errors[] = "Reserved word used for whitelist file name.";
} else {
if (is_validwhitelistname($_POST['name']) == false)
- $input_errors[] = "Whitelist file name may only consist of the characters a-z, A-Z and 0-9 _. Note: No Spaces. Press Cancel to reset.";
+ $input_errors[] = "Whitelist file name may only consist of the characters a-z, A-Z and 0-9 _. Note: No Spaces. Press Cancel to reset.";
}
@@ -137,7 +135,7 @@ if ($_POST['submit']) {
sync_snort_package_config();
- header("Location: /snort/snort_interfaces_suppress_edit.php?id=$id");
+ header("Location: /snort/snort_interfaces_suppress.php");
exit;
}