From 16ccc273a9a112a49168305f347c301cf85a348e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Kolly?= Date: Mon, 29 Jul 2019 14:27:44 +0200 Subject: [PATCH] Don't actually enclose CAA records in brackets --- lib/Froxlor/Api/Commands/DomainZones.php | 12 ++++-------- lib/Froxlor/Dns/Dns.php | 4 ++-- lib/userdata.inc.php.bak | 10 ++++++++++ 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 lib/userdata.inc.php.bak diff --git a/lib/Froxlor/Api/Commands/DomainZones.php b/lib/Froxlor/Api/Commands/DomainZones.php index 9e233fec..88b4eb80 100644 --- a/lib/Froxlor/Api/Commands/DomainZones.php +++ b/lib/Froxlor/Api/Commands/DomainZones.php @@ -145,8 +145,7 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour if (empty($matches)) { $errors[] = $this->lng['error']['dns_content_invalid']; } else { - // check that CAA content is enclosed in " " - $content = \Froxlor\Dns\Dns::encloseTXTContent($matches[0]); + $content = $matches[0]; } } elseif ($type == 'CNAME' || $type == 'DNAME') { // check for trailing dot @@ -171,8 +170,7 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour // append trailing dot (again) $content .= '.'; } elseif ($type == 'LOC' && ! empty($content)) { - // check that LOC content is enclosed in " " - $content = \Froxlor\Dns\Dns::encloseTXTContent($content); + $content = $content; } elseif ($type == 'MX') { if ($prio === null || $prio < 0) { $errors[] = $this->lng['error']['dns_mx_prioempty']; @@ -208,8 +206,7 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour // append trailing dot (again) $content .= '.'; } elseif ($type == 'RP' && ! empty($content)) { - // check that RP content is enclosed in " " - $content = \Froxlor\Dns\Dns::encloseTXTContent($content); + $content = $content; } elseif ($type == 'SRV') { if ($prio === null || $prio < 0) { $errors[] = $this->lng['error']['dns_srv_prioempty']; @@ -246,8 +243,7 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour $content .= '.'; } } elseif ($type == 'SSHFP' && ! empty($content)) { - // check that SSHFP content is enclosed in " " - $content = \Froxlor\Dns\Dns::encloseTXTContent($content); + $content = $content; } elseif ($type == 'TXT' && ! empty($content)) { // check that TXT content is enclosed in " " $content = \Froxlor\Dns\Dns::encloseTXTContent($content); diff --git a/lib/Froxlor/Dns/Dns.php b/lib/Froxlor/Dns/Dns.php index bd0b4a78..2bf9c371 100644 --- a/lib/Froxlor/Dns/Dns.php +++ b/lib/Froxlor/Dns/Dns.php @@ -302,10 +302,10 @@ class Dns } foreach ($caa_entries as $entry) { - $zonerecords[] = new DnsEntry('@', 'CAA', self::encloseTXTContent($entry)); + $zonerecords[] = new DnsEntry('@', 'CAA', $entry); // additional required records by subdomain setting if ($domain['wwwserveralias'] == '1') { - $zonerecords[] = new DnsEntry('www', 'CAA', self::encloseTXTContent($entry)); + $zonerecords[] = new DnsEntry('www', 'CAA', $entry); } } } diff --git a/lib/userdata.inc.php.bak b/lib/userdata.inc.php.bak new file mode 100644 index 00000000..4f1b32db --- /dev/null +++ b/lib/userdata.inc.php.bak @@ -0,0 +1,10 @@ +