Don't actually enclose CAA records in brackets

This commit is contained in:
Marc-André Kolly
2019-07-29 14:27:44 +02:00
parent 95d47eb6c9
commit 16ccc273a9
3 changed files with 16 additions and 10 deletions

View File

@@ -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);

View File

@@ -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);
}
}
}

10
lib/userdata.inc.php.bak Normal file
View File

@@ -0,0 +1,10 @@
<?php
$sql['user'] = 'froxlor010';
$sql['password'] = 'fr0xl0r.TravisCI';
$sql['host'] = '127.0.0.1';
$sql['db'] = 'froxlor010';
$sql_root[0]['user'] = 'root';
$sql_root[0]['password'] = 'fr0xl0r.TravisCI';
$sql_root[0]['host'] = '127.0.0.1';
$sql_root[0]['caption'] = 'Test default';
$sql['debug'] = true;