Allow underscore in record targets

Makes record target validation less strict and allows underscore.
This is requirement for IPA sites.

https://fedorahosted.org/freeipa/ticket/3550
This commit is contained in:
Tomas Babej
2013-04-25 12:45:54 +02:00
committed by Martin Kosek
parent 4cff518517
commit 2973128cf0
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -373,7 +373,7 @@ def _bind_hostname_validator(ugettext, value):
try:
# Allow domain name which is not fully qualified. These are supported
# in bind and then translated as <non-fqdn-name>.<domain>.
validate_hostname(value, check_fqdn=False)
validate_hostname(value, check_fqdn=False, allow_underscore=True)
except ValueError, e:
return _('invalid domain-name: %s') \
% unicode(e)