summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index 417deb2..e5702f2 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -307,8 +307,12 @@ if ($_POST) {
$address = array_merge($address, $rangesubnets);
} else {
$tmpaddress = $_POST["address{$x}"];
- if(is_ipaddr($_POST["address{$x}"]) && $_POST["address_subnet{$x}"] <> "")
- $tmpaddress .= "/" . $_POST["address_subnet{$x}"];
+ if($_POST['type'] != "host" && is_ipaddr($_POST["address{$x}"]) && $_POST["address_subnet{$x}"] <> "") {
+ if (!is_subnet($_POST["address{$x}"] . "/" . $_POST["address_subnet{$x}"]))
+ $input_errors[] = sprintf(gettext('%s/%s is not a valid subnet.'), $_POST["address{$x}"], $_POST["address_subnet{$x}"]);
+ else
+ $tmpaddress .= "/" . $_POST["address_subnet{$x}"];
+ }
$address[] = $tmpaddress;
}
if ($_POST["detail{$x}"] <> "") {
OpenPOWER on IntegriCloud