From ee38585eb460c54a33227f975d10d9ee499a2f12 Mon Sep 17 00:00:00 2001 From: Joona Hoikkala Date: Sun, 8 Nov 2015 21:43:48 +0200 Subject: [PATCH] Refactored domain flag checks into their own helper function to clear space for future checks --- letsencrypt/cli.py | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 1f04ee173..c66060d48 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -1152,17 +1152,29 @@ def check_config_sanity(args): """ # Domain checks if args.domains is not None: - # Check if there's a wildcard domain - if any(d.startswith("*.") for d in args.domains): - raise errors.ConfigurationError("Error: Wildcard domains are not supported") - # Punycode - if any("xn--" in d for d in args.domains): - raise errors.ConfigurationError("Error: Punycode domains are not supported") - # FQDN, checks: - # Characters used, domain parts < 63 chars, tld > 3 < 6 chars - fqdn = re.compile("^((?!-)[A-Za-z0-9-]{1,63}(? 3 < 6 chars + fqdn = re.compile("^((?!-)[A-Za-z0-9-]{1,63}(?