no quotation of dns data for powerdns
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -292,7 +292,7 @@ function addRequiredEntry($record = '@', $type = 'A', &$required)
|
||||
function encloseTXTContent($txt_content, $isMultiLine = false)
|
||||
{
|
||||
// check that TXT content is enclosed in " "
|
||||
if ($isMultiLine == false) {
|
||||
if ($isMultiLine == false && Settings::Get('system.dns_server') != 'pdns') {
|
||||
if (substr($txt_content, 0, 1) != '"') {
|
||||
$txt_content = '"' . $txt_content;
|
||||
}
|
||||
@@ -300,6 +300,15 @@ function encloseTXTContent($txt_content, $isMultiLine = false)
|
||||
$txt_content .= '"';
|
||||
}
|
||||
}
|
||||
if (Settings::Get('system.dns_server') == 'pdns') {
|
||||
// no quotation for PowerDNS
|
||||
if (substr($txt_content, 0, 1) == '"') {
|
||||
$txt_content = substr($txt_content, 1);
|
||||
}
|
||||
if (substr($txt_content, - 1) == '"') {
|
||||
$txt_content = substr($txt_content, 0, -1);
|
||||
}
|
||||
}
|
||||
return $txt_content;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user