mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
committed by
Martin Kosek
parent
ebfda866dd
commit
c16c257145
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user