From 47d67bc88a0fbd00b1c37c4915466834879785a0 Mon Sep 17 00:00:00 2001
From: digdug3
Date: Wed, 25 Jul 2012 09:42:36 +0300
Subject: Update config/snort/snort_alerts.php
Fix displaying Snort descriptions with "," like: "ET TROJAN MS Terminal Server User A Login, possible Morto inbound"
---
config/snort/snort_alerts.php | 49 +++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/config/snort/snort_alerts.php b/config/snort/snort_alerts.php
index 663e7621..b3afe941 100644
--- a/config/snort/snort_alerts.php
+++ b/config/snort/snort_alerts.php
@@ -47,7 +47,7 @@ if (empty($instanceid))
$instanceid = 0;
if (!is_array($config['installedpackages']['snortglobal']['rule']))
- $config['installedpackages']['snortglobal']['rule'] = array();
+ $config['installedpackages']['snortglobal']['rule'] = array();
$a_instance = &$config['installedpackages']['snortglobal']['rule'];
$snort_uuid = $a_instance[$instanceid]['uuid'];
$if_real = snort_get_real_interface($a_instance[$instanceid]['interface']);
@@ -75,13 +75,13 @@ if ($_POST['save']) {
}
if ($_POST['todelete'] || $_GET['todelete']) {
- $ip = "";
- if($_POST['todelete'])
- $ip = $_POST['todelete'];
- else if($_GET['todelete'])
- $ip = $_GET['todelete'];
- if (is_ipaddr($ip))
- exec("/sbin/pfctl -t snort2c -T delete {$ip}");
+ $ip = "";
+ if($_POST['todelete'])
+ $ip = $_POST['todelete'];
+ else if($_GET['todelete'])
+ $ip = $_GET['todelete'];
+ if (is_ipaddr($ip))
+ exec("/sbin/pfctl -t snort2c -T delete {$ip}");
}
if ($_GET['act'] == "addsuppress" && is_numeric($_GET['sidid']) && is_numeric($_GET['gen_id'])) {
@@ -174,23 +174,23 @@ if ($pconfig['arefresh'] == 'on')
' . $pgtitle . '
';}
/* Display Alert message */
- if ($input_errors) {
- print_input_errors($input_errors); // TODO: add checks
- }
+ if ($input_errors) {
+ print_input_errors($input_errors); // TODO: add checks
+ }
?>