diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2007-05-02 12:42:12 +0000 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2007-05-02 12:42:12 +0000 |
commit | d87fc50b37aec1b27081ef482ae3aadb93ae71e3 (patch) | |
tree | baaf176fb3ec029115108d87019f319eb1b4ba60 | |
parent | e1f1691f3f8184b39bf8f699ed7a2427311bff1b (diff) | |
download | pfsense-d87fc50b37aec1b27081ef482ae3aadb93ae71e3.zip pfsense-d87fc50b37aec1b27081ef482ae3aadb93ae71e3.tar.gz |
Do not allow - in aliases. This breaks port aliases.
tables are fine with the - and the _. Ports only work with _.
-rw-r--r-- | etc/inc/util.inc | 2 | ||||
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 3557bba..0bdf236 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -215,7 +215,7 @@ function is_validaliasname($name) { if (in_array($name, $reserved, true)) return; /* return NULL */ - if (!preg_match("/[^a-zA-Z0-9\-_]/", $name)) + if (!preg_match("/[^a-zA-Z0-9_]/", $name)) return true; else return false; diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index 7db0390..a83d0f8 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -109,7 +109,7 @@ if ($_POST) { $input_errors[] = "Reserved word used for alias name."; } else { if (is_validaliasname($_POST['name']) == false) - $input_errors[] = "The alias name may only consist of the characters a-z, A-Z, 0-9, -, _."; + $input_errors[] = "The alias name may only consist of the characters a-z, A-Z, 0-9, _."; } if ($_POST['type'] == "host") if (!is_ipaddr($_POST['address'])) { |