From 71babd685bbc7f01828663d91bececbc0d4da48b Mon Sep 17 00:00:00 2001 From: bain Date: Tue, 21 Nov 2023 11:50:00 +0100 Subject: [PATCH] fix cert alias regex --- nginx_configurator/certs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx_configurator/certs.py b/nginx_configurator/certs.py index 4c98384..d6fcf8e 100644 --- a/nginx_configurator/certs.py +++ b/nginx_configurator/certs.py @@ -51,7 +51,7 @@ def gather_autossl_directives(nginx_conf: Path): f"Cannot get SSL cert for \"{''.join(domains)}\". Invalid domains." ) - if not re.match(r"^[a-zA-Z0-9-_]$", alias): + if not re.match(r"^[a-zA-Z0-9-_]+$", alias): raise ValueError(f'Invalid cert alias "{alias}"') directives.append((domains, alias))