mirror of
https://github.com/certbot/certbot.git
synced 2026-08-04 12:32:02 +02:00
Changed the checks to be more readable and better semantically
This commit is contained in:
+2
-2
@@ -1153,10 +1153,10 @@ def check_config_sanity(args):
|
|||||||
# Domain checks
|
# Domain checks
|
||||||
if args.domains is not None:
|
if args.domains is not None:
|
||||||
# Check if there's a wildcard domain
|
# Check if there's a wildcard domain
|
||||||
if any(True for d in args.domains if d.startswith("*.")):
|
if any(d.startswith("*.") for d in args.domains):
|
||||||
raise errors.ConfigurationError("Error: Wildcard domains are not supported")
|
raise errors.ConfigurationError("Error: Wildcard domains are not supported")
|
||||||
# Punycode
|
# Punycode
|
||||||
if any(True for d in args.domains if "xn--" in d):
|
if any("xn--" in d for d in args.domains):
|
||||||
raise errors.ConfigurationError("Error: Punycode domains are not supported")
|
raise errors.ConfigurationError("Error: Punycode domains are not supported")
|
||||||
# Check for FQDN
|
# Check for FQDN
|
||||||
fqdn = re.compile("^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{2,6}$")
|
fqdn = re.compile("^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{2,6}$")
|
||||||
|
|||||||
Reference in New Issue
Block a user