aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-07-16 14:40:38 +0000
committerErmal <eri@pfsense.org>2012-07-16 14:40:38 +0000
commit92fc14e2e523e2c314868fd861a80d0a25bd7549 (patch)
tree01f1ddefba965abb30e7229fbcd34405c59ff8cf /config/snort
parent8de5b3c9ef97a63a420cf3fa11852b492e04a99e (diff)
downloadpfsense-packages-92fc14e2e523e2c314868fd861a80d0a25bd7549.tar.gz
pfsense-packages-92fc14e2e523e2c314868fd861a80d0a25bd7549.tar.bz2
pfsense-packages-92fc14e2e523e2c314868fd861a80d0a25bd7549.zip
Add input validation
Diffstat (limited to 'config/snort')
-rw-r--r--config/snort/snort_define_servers.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/config/snort/snort_define_servers.php b/config/snort/snort_define_servers.php
index ef06039d..50342e0a 100644
--- a/config/snort/snort_define_servers.php
+++ b/config/snort/snort_define_servers.php
@@ -96,6 +96,14 @@ if ($_POST) {
$natent = array();
$natent = $pconfig;
+ foreach ($snort_servers as $key => $server) {
+ if ($_POST["def_{$key}"] && !is_alias($_POST["def_{$key}"]))
+ $input_errors[] = "Only aliases are allowed";
+ }
+ foreach ($snort_ports as $key => $server) {
+ if ($_POST["def_{$key}"] && !is_alias($_POST["def_{$key}"]))
+ $input_errors[] = "Only aliases are allowed";
+ }
/* if no errors write to conf */
if (!$input_errors) {
/* post new options */