diff options
author | Phil Davis <phil.davis@inf.org> | 2015-01-30 22:45:27 +0545 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-02-02 05:56:40 -0200 |
commit | b82159a625c8cfe9a456c6cb381b0d629961bd3a (patch) | |
tree | d33bb0f976de89c1210b668804494ba3e6100419 /usr | |
parent | 2cf35754c3aa1506148c101d71e288e436c62d18 (diff) | |
download | pfsense-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.
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/services_unbound_domainoverride_edit.php | 2 |
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."); |