diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-12-08 17:47:11 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-12-08 17:47:11 +0000 |
commit | 7c3f1ed257acfa553c95cd6accd14b50b35b6089 (patch) | |
tree | c690bb2a7a5f09e46b1f492e4f60489e6c61f3ea /usr/local | |
parent | 52d618c2187cb7047af5a6fcee6699199671567a (diff) | |
download | pfsense-7c3f1ed257acfa553c95cd6accd14b50b35b6089.zip pfsense-7c3f1ed257acfa553c95cd6accd14b50b35b6089.tar.gz |
Use is_port here.
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index 4e60186..49466c3 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -257,9 +257,7 @@ if ($_POST) { if (!alias_same_type($_POST["address{$x}"], $_POST['type'])) $wrongaliases .= " " . $_POST["address{$x}"]; } else if ($_POST['type'] == "port") { - if (preg_match("/[^[[:digit:]]]/", $_POST["address{$x}"]) || strlen($_POST["address{$x}"]) > 5) - $input_errors[] = $_POST["address{$x}"] . " is not a valid {$_POST['type']} alias."; - else if (intval($_POST["address{$x}"]) < 0 || intval($_POST["address{$x}"]) > 65535) + if (!is_port($_POST["address{$x}"]) $input_errors[] = $_POST["address{$x}"] . " is not a valid port alias."; } else if ($_POST['type'] == "host" || $_POST['type'] == "network") { if (!is_ipaddr($_POST["address{$x}"]) && !is_hostname($_POST["address{$x}"])) |