(r)zongen.py: Fix maximum label length

This commit is contained in:
planetcyborg.de root-user 2014-12-30 10:54:56 +01:00
parent 7d9a5bfc30
commit c8ca3e7518
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