fix cert alias regex

This commit is contained in:
bain 2023-11-21 11:50:00 +01:00
parent 4ccddfe58d
commit 71babd685b
Signed by: bain
GPG key ID: 31F0F25E3BED0B9B

View file

@ -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))