summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_aliases_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2014-02-11 10:37:37 +0100
committerErmal <eri@pfsense.org>2014-02-11 10:37:37 +0100
commitee41ab022d92cf7d0a1b75e1d85aca7162648292 (patch)
tree0dc26d2108629d80a9c37acc2f789a5a6f2fac0f /usr/local/www/firewall_aliases_edit.php
parent8c466abb745d0572764a4443ea63ef738b5d5a13 (diff)
downloadpfsense-ee41ab022d92cf7d0a1b75e1d85aca7162648292.zip
pfsense-ee41ab022d92cf7d0a1b75e1d85aca7162648292.tar.gz
Catch a validation issue reported on the mailing list thread: IPv6 address data validation from: Brian Candler. It prevents putting a subnet in the address field since it then breaks the whole filter generation process
Diffstat (limited to 'usr/local/www/firewall_aliases_edit.php')
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index ab149c8..417deb2 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -296,9 +296,9 @@ if ($_POST) {
if (!is_port($_POST["address{$x}"]))
$input_errors[] = $_POST["address{$x}"] . " " . gettext("is not a valid port or alias.");
} else if ($_POST['type'] == "host" || $_POST['type'] == "network") {
- if (!is_ipaddr($_POST["address{$x}"])
+ if (is_subnet($_POST["address{$x}"]) || (!is_ipaddr($_POST["address{$x}"])
&& !is_hostname($_POST["address{$x}"])
- && !is_iprange($_POST["address{$x}"]))
+ && !is_iprange($_POST["address{$x}"])))
$input_errors[] = sprintf(gettext('%1$s is not a valid %2$s alias.'), $_POST["address{$x}"], $_POST['type']);
}
if (is_iprange($_POST["address{$x}"])) {
OpenPOWER on IntegriCloud