diff --git a/install/froxlor.sql b/install/froxlor.sql index f3cf318c..51ffe079 100644 --- a/install/froxlor.sql +++ b/install/froxlor.sql @@ -375,7 +375,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('admin', 'show_news_feed', '0'), ('admin', 'show_version_login', '0'), ('admin', 'show_version_footer', '0'), - ('caa', 'caa_entry', ''), + ('caa', 'caa_entry', ''), ('spf', 'use_spf', '0'), ('spf', 'spf_entry', '"v=spf1 a mx -all"'), ('dkim', 'dkim_algorithm', 'all'), @@ -562,7 +562,7 @@ opcache.interned_strings_buffer'), ('system', 'mod_fcgid_defaultini', '1'), ('system', 'ftpserver', 'proftpd'), ('system', 'dns_createmailentry', '0'), - ('system', 'dns_createcaaentry', '1'), + ('system', 'dns_createcaaentry', '1'), ('system', 'froxlordirectlyviahostname', '0'), ('system', 'report_enable', '1'), ('system', 'report_webmax', '90'), diff --git a/tests/DomainZones/DomainZonesTest.php b/tests/DomainZones/DomainZonesTest.php index fef9ba2f..03fe78d0 100644 --- a/tests/DomainZones/DomainZonesTest.php +++ b/tests/DomainZones/DomainZonesTest.php @@ -277,6 +277,30 @@ class DomainZonesTest extends TestCase DomainZones::getLocal($admin_userdata, $data)->add(); } + public function testAdminDomainZonesAddCAA() + { + global $admin_userdata; + + $data = [ + 'domainname' => 'test2.local', + 'record' => '@', + 'type' => 'CAA', + 'content' => '0 issue "letsencrypt.org"' + ]; + $json_result = DomainZones::getLocal($admin_userdata, $data)->add(); + $result = json_decode($json_result, true)['data']; + $this->assertTrue(count($result) > 1); + $found = false; + foreach ($result as $entry) { + if (substr($entry, strlen('0 issue "letsencrypt.org"') * - 1) == '0 issue "letsencrypt.org"') { + $found = true; + break; + } + } + $this->assertTrue($found); + $this->assertEquals('@ 18000 IN CAA 0 issue "letsencrypt.org"', $entry); + } + public function testAdminDomainZonesAddCname() { global $admin_userdata;