allow non fqdn CNAME entries (froxlor appends zone's domain automatically if there's no trailing dot), fixes #434

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p) 2017-06-04 11:29:21 +02:00
parent 332e627007
commit e95a917812

View File

@ -128,6 +128,9 @@ if ($action == 'add_record' && ! empty($_POST)) {
if (substr($content, - 1) == '.') {
// remove it for checks
$content = substr($content, 0, - 1);
} else {
// add domain name
$content .= '.' . $domain;
}
if (! validateDomain($content)) {
$errors[] = $lng['error']['dns_cname_invaliddom'];