summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_unbound.php
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2014-11-28 15:52:56 -0600
committerChris Buechler <cmb@pfsense.org>2014-11-28 15:54:58 -0600
commitb7960673bef61c323715da72d52e4aece5f1fd57 (patch)
tree463d1badb101ba4c9a98c9b080c85e96259414ed /usr/local/www/services_unbound.php
parent2388a1ace93c831d203d541d38ad8e05d80ff560 (diff)
downloadpfsense-b7960673bef61c323715da72d52e4aece5f1fd57.zip
pfsense-b7960673bef61c323715da72d52e4aece5f1fd57.tar.gz
Fix input validation for DNS resolver when localhost is enabled in resolv.conf and "all" chosen in Network Interfaces. While here, set something other than '' when all is chosen.
Diffstat (limited to 'usr/local/www/services_unbound.php')
-rw-r--r--usr/local/www/services_unbound.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/services_unbound.php b/usr/local/www/services_unbound.php
index 158b3e2..ed99061 100644
--- a/usr/local/www/services_unbound.php
+++ b/usr/local/www/services_unbound.php
@@ -115,8 +115,8 @@ if ($_POST) {
if (empty($_POST['active_interface'])) {
$input_errors[] = "One or more Network Interfaces must be selected for binding.";
- } else if (!isset($config['system']['dnslocalhost']) && !in_array("lo0", $_POST['active_interface'])) {
- $input_errors[] = "This system is configured to use the DNS Resolver as its DNS server, so Localhost must be selected in Network Interfaces.";
+ } else if (!isset($config['system']['dnslocalhost']) && (!in_array("lo0", $_POST['active_interface']) && !in_array("all", $_POST['active_interface']))) {
+ $input_errors[] = "This system is configured to use the DNS Resolver as its DNS server, so Localhost or All must be selected in Network Interfaces.";
}
if (empty($_POST['outgoing_interface'])) {
@@ -278,7 +278,7 @@ function show_advanced_dns() {
<?=gettext("Interface IPs used by the DNS Resolver for responding to queries from clients. If an interface has both IPv4 and IPv6 IPs, both are used. Queries to other interface IPs not selected below are discarded. The default behavior is to respond to queries on every available IPv4 and IPv6 address.");?>
<br /><br />
<select id="active_interface" name="active_interface[]" multiple="multiple" size="<?php echo $size; ?>">
- <option value="" <?php if (empty($pconfig['active_interface']) || empty($pconfig['active_interface'][0])) echo 'selected="selected"'; ?>>All</option>
+ <option value="all" <?php if (empty($pconfig['active_interface']) || empty($pconfig['active_interface'][0]) || in_array("all", $pconfig['active_interface'], true)) echo 'selected="selected"'; ?>>All</option>
<?php
foreach ($interface_addresses as $laddr):
$selected = "";
OpenPOWER on IntegriCloud