summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_aliases_edit.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-12-08 17:47:11 +0000
committerErmal Luçi <eri@pfsense.org>2009-12-08 17:47:11 +0000
commit7c3f1ed257acfa553c95cd6accd14b50b35b6089 (patch)
treec690bb2a7a5f09e46b1f492e4f60489e6c61f3ea /usr/local/www/firewall_aliases_edit.php
parent52d618c2187cb7047af5a6fcee6699199671567a (diff)
downloadpfsense-7c3f1ed257acfa553c95cd6accd14b50b35b6089.zip
pfsense-7c3f1ed257acfa553c95cd6accd14b50b35b6089.tar.gz
Use is_port here.
Diffstat (limited to 'usr/local/www/firewall_aliases_edit.php')
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php4
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}"]))
OpenPOWER on IntegriCloud