summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-01-30 22:45:27 +0545
committerRenato Botelho <garga@FreeBSD.org>2015-02-02 05:56:40 -0200
commitb82159a625c8cfe9a456c6cb381b0d629961bd3a (patch)
treed33bb0f976de89c1210b668804494ba3e6100419
parent2cf35754c3aa1506148c101d71e288e436c62d18 (diff)
downloadpfsense-b82159a625c8cfe9a456c6cb381b0d629961bd3a.zip
pfsense-b82159a625c8cfe9a456c6cb381b0d629961bd3a.tar.gz
Unbound domain override IP:port validation
The domain override is IP:port is invalid if either the IP address OR port is invalid. Previously you could put an invalid IP with valid port, or valid IP with invalid port.
-rw-r--r--usr/local/www/services_unbound_domainoverride_edit.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/services_unbound_domainoverride_edit.php b/usr/local/www/services_unbound_domainoverride_edit.php
index b8c37a5..821823b 100644
--- a/usr/local/www/services_unbound_domainoverride_edit.php
+++ b/usr/local/www/services_unbound_domainoverride_edit.php
@@ -86,7 +86,7 @@ if ($_POST) {
if ($_POST['ip']) {
if (strpos($_POST['ip'],'@') !== false) {
$ip_details = explode("@", $_POST['ip']);
- if (!is_ipaddr($ip_details[0]) && !is_port($ip_details[1]))
+ if (!is_ipaddr($ip_details[0]) || !is_port($ip_details[1]))
$input_errors[] = gettext("A valid IP address and port must be specified, for example 192.168.100.10@5353.");
} else if (!is_ipaddr($_POST['ip']))
$input_errors[] = gettext("A valid IP address must be specified, for example 192.168.100.10.");
OpenPOWER on IntegriCloud