summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_unbound_domainoverride_edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-01-30 22:45:27 +0545
committerPhil Davis <phil.davis@inf.org>2015-01-30 22:45:27 +0545
commit07b379525d8182e73f7fd46f39dcfca9b8e183e0 (patch)
tree86d4611d0f3820b8a8181dd6522d24a1776dca07 /usr/local/www/services_unbound_domainoverride_edit.php
parentf5b23288160aebd53e5d983ab872b468c09934ed (diff)
downloadpfsense-07b379525d8182e73f7fd46f39dcfca9b8e183e0.zip
pfsense-07b379525d8182e73f7fd46f39dcfca9b8e183e0.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.
Diffstat (limited to 'usr/local/www/services_unbound_domainoverride_edit.php')
-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