diff options
author | Ermal <eri@pfsense.org> | 2014-02-11 10:37:37 +0100 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2014-02-11 10:37:37 +0100 |
commit | ee41ab022d92cf7d0a1b75e1d85aca7162648292 (patch) | |
tree | 0dc26d2108629d80a9c37acc2f789a5a6f2fac0f /usr/local/www/firewall_aliases_edit.php | |
parent | 8c466abb745d0572764a4443ea63ef738b5d5a13 (diff) | |
download | pfsense-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-x | usr/local/www/firewall_aliases_edit.php | 4 |
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}"])) { |