diff options
-rw-r--r-- | etc/inc/util.inc | 3 | ||||
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index b7df86b..7b8fc57 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -473,8 +473,7 @@ function is_validaliasname($name) { $reserved = array("port", "pass"); 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) && (strlen($name) < 32)) return true; else return false; diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index ce730e1..8602740 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -142,7 +142,7 @@ if ($_POST) { $input_errors[] = gettext("Reserved word used for alias name."); } else { if (is_validaliasname($_POST['name']) == false) - $input_errors[] = gettext("The alias name may only consist of the characters") . " a-z, A-Z, 0-9, _."; + $input_errors[] = gettext("The alias name must be less than 32 characters long and may only consist of the characters") . " a-z, A-Z, 0-9, _."; } /* check for name conflicts */ if (empty($a_aliases[$id])) { |