summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_aliases_edit.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-12-30 16:34:18 +0000
committerErmal Luçi <eri@pfsense.org>2009-12-30 16:34:59 +0000
commit231e060664779b0349e93a84b72dab322c3f8fb8 (patch)
tree91225de22f349bb71edeb5006ce592222e83d33d /usr/local/www/firewall_aliases_edit.php
parent0c8d27635cfe61d746dd756f6cd29866252831a0 (diff)
downloadpfsense-231e060664779b0349e93a84b72dab322c3f8fb8.zip
pfsense-231e060664779b0349e93a84b72dab322c3f8fb8.tar.gz
Ticket #261 Do not consider ports as hostnames. This changes the is_port function to consider ':'(ranges) as ports. This seems a previous feature i do not agree with much, but users decide right?!
Diffstat (limited to 'usr/local/www/firewall_aliases_edit.php')
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index 45fb289..36126de 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -242,13 +242,8 @@ if ($_POST) {
if (!alias_same_type($_POST["address{$x}"], $_POST['type']))
$wrongaliases .= " " . $_POST["address{$x}"];
} else if ($_POST['type'] == "port") {
- $testports = explode(":", $_POST["address{$x}"]);
- foreach ($testports as $port) {
- if (!is_port($port)) {
- $input_errors[] = $_POST["address{$x}"] . " is not a valid port or alias.";
- break;
- }
- }
+ if (!is_port($_POST["address{$x}"]))
+ $input_errors[] = $_POST["address{$x}"] . " is not a valid port or alias.";
} else if ($_POST['type'] == "host" || $_POST['type'] == "network") {
if (!is_ipaddr($_POST["address{$x}"]) && !is_hostname($_POST["address{$x}"]))
$input_errors[] = $_POST["address{$x}"] . " is not a valid {$_POST['type']} alias.";
OpenPOWER on IntegriCloud