From c16c257145e44599df5b833954fc84f946546ea1 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 27 Sep 2012 07:45:32 -0400 Subject: Fix NS records in installation Our installation added two final dots to the NS records, so the records were invalid, Bind ignored the entire zone, and name resolution didn't work. Fix this error and add a check for empty DNS labels to the validator --- ipalib/util.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ipalib/util.py') diff --git a/ipalib/util.py b/ipalib/util.py index 53b6c80c5..ca14aee36 100644 --- a/ipalib/util.py +++ b/ipalib/util.py @@ -266,6 +266,9 @@ def validate_hostname(hostname, check_fqdn=True, allow_underscore=False): if hostname.endswith('.'): hostname = hostname[:-1] + if '..' in hostname: + raise ValueError(_('hostname contains empty label (consecutive dots)')) + if '.' not in hostname: if check_fqdn: raise ValueError(_('not fully qualified')) -- cgit