Revision c00e6bd4
Added by Renato Botelho over 11 years ago
usr/local/www/firewall_aliases_edit.php | ||
---|---|---|
307 | 307 |
$address = array_merge($address, $rangesubnets); |
308 | 308 |
} else { |
309 | 309 |
$tmpaddress = $_POST["address{$x}"]; |
310 |
if(is_ipaddr($_POST["address{$x}"]) && $_POST["address_subnet{$x}"] <> "") |
|
311 |
$tmpaddress .= "/" . $_POST["address_subnet{$x}"]; |
|
310 |
if($_POST['type'] != "host" && is_ipaddr($_POST["address{$x}"]) && $_POST["address_subnet{$x}"] <> "") { |
|
311 |
if (!is_subnet($_POST["address{$x}"] . "/" . $_POST["address_subnet{$x}"])) |
|
312 |
$input_errors[] = sprintf(gettext('%s/%s is not a valid subnet.'), $_POST["address{$x}"], $_POST["address_subnet{$x}"]); |
|
313 |
else |
|
314 |
$tmpaddress .= "/" . $_POST["address_subnet{$x}"]; |
|
315 |
} |
|
312 | 316 |
$address[] = $tmpaddress; |
313 | 317 |
} |
314 | 318 |
if ($_POST["detail{$x}"] <> "") { |
Also available in: Unified diff
Help ticket #3449:
Improve data validation to avoid save a host/subnet or a IPv4 with
invalid mask. The reported error is on javascript and only happen on
IE8,but this fix will prevent the same issue happening in the future on
a different browser.