domainname must not be an IP

This commit is contained in:
2016-08-31 15:50:10 +02:00
parent 6cfa0fc216
commit 3a5b1090c7
4 changed files with 584 additions and 552 deletions

View File

@ -503,6 +503,13 @@ class DomainnameOption(Option):
return
except ValueError:
pass
else:
try:
IP('{0}/32'.format(value))
except ValueError:
pass
else:
raise ValueError(_('invalid domainname, must not be an IP'))
if self._get_extra('_dom_type') == 'netbios':
part_name_length = 15
else: