diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-12-08 17:41:37 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-12-08 17:41:37 +0000 |
commit | 52d618c2187cb7047af5a6fcee6699199671567a (patch) | |
tree | d53c2044d55c68a63a1c341ae4f3cf8c83ad9ef8 /usr/local | |
parent | aad51dbf2b98ed8df23946f1d72e1b0fbadf9ba3 (diff) | |
download | pfsense-52d618c2187cb7047af5a6fcee6699199671567a.zip pfsense-52d618c2187cb7047af5a6fcee6699199671567a.tar.gz |
Add one more check for port aliases now that /etc/services can be used in port names.
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index 7324523..4e60186 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -147,6 +147,8 @@ if ($_POST) { $x = is_validaliasname($_POST['name']); if (!isset($x)) { $input_errors[] = "Reserved word used for alias name."; + } else if ($_POST['type'] == "port" && (getservbyname($_POST['name'], "tcp") || getservbyname($_POST['name'], "udp"))) { + $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, _."; |