summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-12-29 23:25:36 +0000
committerErmal Luçi <eri@pfsense.org>2009-12-29 23:26:16 +0000
commit86b66287f3c02adc1e7f244f65bf065b2111d598 (patch)
tree5cfe125da74e00f11c35aa465a8eea2fb226b110
parentf604497aa78d723f61bae3e4c3022e7a95e6dbaf (diff)
downloadpfsense-86b66287f3c02adc1e7f244f65bf065b2111d598.zip
pfsense-86b66287f3c02adc1e7f244f65bf065b2111d598.tar.gz
Ticket #258 fix regression.
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index a5eb4ce..45fb289 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -242,8 +242,13 @@ if ($_POST) {
if (!alias_same_type($_POST["address{$x}"], $_POST['type']))
$wrongaliases .= " " . $_POST["address{$x}"];
} else if ($_POST['type'] == "port") {
- if (!is_port($_POST["address{$x}"]))
- $input_errors[] = $_POST["address{$x}"] . " is not a valid port alias.";
+ $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;
+ }
+ }
} 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