(r)zongen.py: Fix maximum label length

This commit is contained in:
mortzu 2014-12-30 10:54:56 +01:00
parent 7a653dc6a7
commit 63dc193ff7
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ def str_to_domainlabel(s):
label = re.sub("^-*", "", label)
label = re.sub("-*$", "", label)
if not re.match("^[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$", label):
if not re.match("^[a-zA-Z][a-zA-Z0-9-]{,61}[a-zA-Z0-9]$", label):
raise RuntimeError("Not convertable to a domain label: %s" % s)
return label

View File

@ -12,7 +12,7 @@ def str_to_domainlabel(s):
label = re.sub("^-*", "", label)
label = re.sub("-*$", "", label)
if not re.match("^[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$", label):
if not re.match("^[a-zA-Z][a-zA-Z0-9-]{,61}[a-zA-Z0-9]$", label):
raise RuntimeError("Not convertable to a domain label: %s" % s)
return label