summaryrefslogtreecommitdiffstats
path: root/etc/inc/unbound.inc
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:44:29 -0200
commitcfb5073f83fa80e5b40476b12ea91ff5114c60fc (patch)
tree1234f5caf3e191785ad6ce4585efeaf9dd58657a /etc/inc/unbound.inc
parentfbf3d06ee49ccc3136997306b20b807c7a4b8c85 (diff)
downloadpfsense-cfb5073f83fa80e5b40476b12ea91ff5114c60fc.zip
pfsense-cfb5073f83fa80e5b40476b12ea91ff5114c60fc.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 'etc/inc/unbound.inc')
-rw-r--r--etc/inc/unbound.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc
index 1bd2f7e..496ca66 100644
--- a/etc/inc/unbound.inc
+++ b/etc/inc/unbound.inc
@@ -205,7 +205,7 @@ EOF;
// Add custom Unbound options
if ($config['unbound']['custom_options']) {
- $custom_options_source = explode("\n", $config['unbound']['custom_options']);
+ $custom_options_source = explode("\n", base64_decode($config['unbound']['custom_options']));
$custom_options = "# Unbound custom options\n";
foreach ($custom_options_source as $ent)
$custom_options .= $ent."\n";
OpenPOWER on IntegriCloud