summaryrefslogtreecommitdiffstats
path: root/usr
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:52 +0100
commitf188be51ae242a6de7f99b0c6206ec24d5296af4 (patch)
tree803292119318924a0cb5dc328789f2196dbf45f9 /usr
parent6ce0e31c66128746be4cdef256bcaaec209f616d (diff)
downloadpfsense-f188be51ae242a6de7f99b0c6206ec24d5296af4.zip
pfsense-f188be51ae242a6de7f99b0c6206ec24d5296af4.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')
-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 77a2630..a66605b 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -289,9 +289,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 (($used_for_routes === 1)
&& !is_ipaddr($_POST["address{$x}"])
OpenPOWER on IntegriCloud