summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-01-05 15:41:38 -0200
committerRenato Botelho <garga@FreeBSD.org>2015-01-05 15:41:38 -0200
commit0a23cddced057d929c53f3ad1e5d6898a3fada50 (patch)
tree4d6eaf1781ab55af6ae643367d89533a60088ba6 /usr/local
parent24149c31763abff0f25da381c58b22e6f9c44658 (diff)
downloadpfsense-0a23cddced057d929c53f3ad1e5d6898a3fada50.zip
pfsense-0a23cddced057d929c53f3ad1e5d6898a3fada50.tar.gz
Fix #4090:
- Unbound advanced options may contain double quotes and it breaks the syntax when a backup is restored because newlines are trimmed. Save it in base64 format is a safe way to prevent it - Bump config version to 11.5 - Provide upgrade code to encode current config or the one that came from unbound package on 2.1.5
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/services_unbound.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/services_unbound.php b/usr/local/www/services_unbound.php
index 52d976d..2b943dd 100644
--- a/usr/local/www/services_unbound.php
+++ b/usr/local/www/services_unbound.php
@@ -81,7 +81,7 @@ if (isset($config['unbound']['txtsupport'])) {
}
$pconfig['port'] = $config['unbound']['port'];
-$pconfig['custom_options'] = $config['unbound']['custom_options'];
+$pconfig['custom_options'] = base64_decode($config['unbound']['custom_options']);
if (empty($config['unbound']['active_interface'])) {
$pconfig['active_interface'] = array();
@@ -171,7 +171,7 @@ if ($_POST) {
$a_unboundcfg['outgoing_interface'] = implode(",", $_POST['outgoing_interface']);
}
- $a_unboundcfg['custom_options'] = str_replace("\r\n", "\n", $_POST['custom_options']);
+ $a_unboundcfg['custom_options'] = base64_encode(str_replace("\r\n", "\n", $_POST['custom_options']));
if (!$input_errors) {
write_config("DNS Resolver configured.");
OpenPOWER on IntegriCloud