do not allow setting www as CNAME record if domain has automatic www-Alias enabled, fixes #895

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2020-10-31 16:16:05 +01:00
parent ea76ce8fcc
commit b1b68364be
4 changed files with 32 additions and 0 deletions

View File

@@ -170,6 +170,10 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
break;
}
}
// check www-alias setting
if ($result['wwwserveralias'] == '1' && $result['iswildcarddomain'] == '0' && $record == 'www') {
$errors[] = $this->lng['error']['no_wwwcnamae_ifwwwalias'];
}
}
// append trailing dot (again)
$content .= '.';