mirror of
https://github.com/certbot/certbot.git
synced 2026-03-01 12:50:24 -05:00
TLDs cannot be longer than 63 characters
This commit is contained in:
parent
78733ae0cb
commit
1051c45166
1 changed files with 2 additions and 2 deletions
|
|
@ -155,8 +155,8 @@ def _check_config_domain_sanity(domains):
|
|||
"Punycode domains are not supported")
|
||||
# FQDN checks from
|
||||
# http://www.mkyong.com/regular-expressions/domain-name-regular-expression-example/
|
||||
# Characters used, domain parts < 63 chars, tld > 1 char
|
||||
# Characters used, domain parts < 63 chars, tld > 1 < 64 chars
|
||||
# first and last char is not "-"
|
||||
fqdn = re.compile("^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{2,}$")
|
||||
fqdn = re.compile("^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{2,63}$")
|
||||
if any(True for d in domains if not fqdn.match(d)):
|
||||
raise errors.ConfigurationError("Requested domain is not a FQDN")
|
||||
|
|
|
|||
Loading…
Reference in a new issue