aboutsummaryrefslogtreecommitdiffstats
path: root/config/dansguardian/dansguardian.inc
diff options
context:
space:
mode:
authormarcelloc <marcellocoutinho@gmail.com>2012-02-08 18:25:02 -0200
committermarcelloc <marcellocoutinho@gmail.com>2012-02-08 18:25:02 -0200
commit3c7a227b885a03e1182bb25475e8f47519d634e9 (patch)
tree6c14edb008f5e4d5a31e684c16ebcad90a8cf8bf /config/dansguardian/dansguardian.inc
parent528abc8cd054bc8a669df260242695045d201e1e (diff)
downloadpfsense-packages-3c7a227b885a03e1182bb25475e8f47519d634e9.tar.gz
pfsense-packages-3c7a227b885a03e1182bb25475e8f47519d634e9.tar.bz2
pfsense-packages-3c7a227b885a03e1182bb25475e8f47519d634e9.zip
dansguardian - improve group name check
Diffstat (limited to 'config/dansguardian/dansguardian.inc')
-rwxr-xr-xconfig/dansguardian/dansguardian.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/config/dansguardian/dansguardian.inc b/config/dansguardian/dansguardian.inc
index 1c079fe7..3708e98c 100755
--- a/config/dansguardian/dansguardian.inc
+++ b/config/dansguardian/dansguardian.inc
@@ -964,10 +964,13 @@ EOF;
function dansguardian_validate_input($post, &$input_errors) {
foreach ($post as $key => $value) {
- if ($key == "name" && $value == "")
+ if (preg_match("/^(name|description)$/",$key) && $value == "")
$input_errors[] = "{$key} could not be empty.";
- else if ($key == "name" && $value=="sample")
+ else if ($key == "name" && $value=="sample")
$input_errors[] = "{$value} cannot be used as name.";
+ else if ($key == "name" && preg_match("/\W/",$value))
+ $input_errors[] = "{$value} cannot be used as name. Use only a-z 0-9 characters";
+
}
}