diff --git a/lib/Froxlor/Api/Commands/DomainZones.php b/lib/Froxlor/Api/Commands/DomainZones.php index 88b4eb80..276dc571 100644 --- a/lib/Froxlor/Api/Commands/DomainZones.php +++ b/lib/Froxlor/Api/Commands/DomainZones.php @@ -144,6 +144,10 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour if (empty($matches)) { $errors[] = $this->lng['error']['dns_content_invalid']; + } elseif (($matches['type'] == 'issue' || $matches['type'] == 'issuewild') && !\Froxlor\Validate\Validate::validateDomain($matches['domain'])) { + $errors[] = $this->lng['error']['dns_content_invalid']; + } elseif ($matches['type'] == 'iodef' && !\Froxlor\Validate\Validate::validateUrl($matches['url'])) { + $errors[] = $this->lng['error']['dns_content_invalid']; } else { $content = $matches[0]; } diff --git a/tests/DomainZones/DomainZonesTest.php b/tests/DomainZones/DomainZonesTest.php index e082fd22..c0bd3143 100644 --- a/tests/DomainZones/DomainZonesTest.php +++ b/tests/DomainZones/DomainZonesTest.php @@ -401,7 +401,7 @@ class DomainZonesTest extends TestCase { global $admin_userdata; - $content = '0 issue "letsencrypt.org"'; + $content = '0 issuewild "letsencrypt.org"'; $data = [ 'domainname' => 'test2.local', 'record' => '@',