aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-09-09 13:59:07 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-09-09 13:59:07 -0400
commitd13557cd988c17b2eaddb6611b315244dd3865a3 (patch)
treeda9c8867f5d77b3f5ef892d4c2c68f63fd3f1400
parent8a33d84b6e7d52e2e7dd414c03428ce6da0296a2 (diff)
downloadpfsense-packages-d13557cd988c17b2eaddb6611b315244dd3865a3.tar.gz
pfsense-packages-d13557cd988c17b2eaddb6611b315244dd3865a3.tar.bz2
pfsense-packages-d13557cd988c17b2eaddb6611b315244dd3865a3.zip
Add validation to ensure Barnyard2 SENSOR_NAME contains no spaces.
-rw-r--r--config/snort/snort_barnyard.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/snort/snort_barnyard.php b/config/snort/snort_barnyard.php
index 902c1637..a0b2c5cf 100644
--- a/config/snort/snort_barnyard.php
+++ b/config/snort/snort_barnyard.php
@@ -106,6 +106,12 @@ if ($_POST['save']) {
$input_errors[] = gettext("You must provide a DB user login name when logging to a MySQL database.");
}
+ // Validate Sensor Name contains no spaces
+ if ($_POST['barnyard_enable'] == 'on') {
+ if (!empty($_POST['barnyard_sensor_name']) && strpos($_POST['barnyard_sensor_name'], " ") !== FALSE)
+ $input_errors[] = gettext("The value for 'Sensor Name' cannot contain spaces.");
+ }
+
// Validate inputs if syslog output enabled
if ($_POST['barnyard_syslog_enable'] == 'on' && $_POST['barnyard_enable'] == "on") {
if ($_POST['barnyard_log_vlan_events'] == 'on' || $_POST['barnyard_log_mpls_events'] == 'on')