aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound/unbound.inc
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2010-12-06 19:50:05 +0200
committerWarren Baker <warren@decoy.co.za>2010-12-06 19:50:05 +0200
commit717ee38afef204bd7853ccf6be1d64fe6d543379 (patch)
tree24f61681fb782d1f3ba35b79839c2c3f2be240d6 /config/unbound/unbound.inc
parent5765408703d661d9d5d5fb39a6bb7bcd92c7cfaa (diff)
downloadpfsense-packages-717ee38afef204bd7853ccf6be1d64fe6d543379.tar.gz
pfsense-packages-717ee38afef204bd7853ccf6be1d64fe6d543379.tar.bz2
pfsense-packages-717ee38afef204bd7853ccf6be1d64fe6d543379.zip
Use correct quotes for TXT records and escape quotes.
Diffstat (limited to 'config/unbound/unbound.inc')
-rw-r--r--config/unbound/unbound.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index fab89742..7f2fc973 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -504,7 +504,8 @@ function unbound_add_host_entries() {
$host_entries .= "local-data-ptr: \"{$host['ip']} {$host['host']}.{$host['domain']}\"\n";
$host_entries .= "local-data: \"{$host['host']}.{$host['domain']} IN A {$host['ip']}\"\n";
if (!empty($host['descr']))
- $host_entries .= "local-data: \"{$host['host']}.{$host['domain']} TXT '{$host['descr']}'\"\n";
+ $host_entries .= "local-data: '{$host['host']}.{$host['domain']} TXT \"".addslashes($host['descr'])."\"'\n";
+
// Do not add duplicate entries
$added_item[$current_host] = true;
}
@@ -521,7 +522,7 @@ function unbound_add_host_entries() {
$host_entries .= "local-data-ptr: \"{$host['ipaddr']} {$host['hostname']}.{$syscfg['domain']}\"\n";
$host_entries .= "local-data: \"{$host['hostname']}.{$syscfg['domain']} IN A {$host['ipaddr']}\"\n";
if (!empty($host['descr']))
- $host_entries .= "local-data: \"{$host['hostname']}.{$syscfg['domain']} TXT '{$host['descr']}'\"\n";
+ $host_entries .= "local-data: '{$host['hostname']}.{$syscfg['domain']} TXT \"".addslashes($host['descr'])."\"'\n";
}
$unbound_entries .= $host_entries;
}