Fix migration script to accept unicode domain names

This commit is contained in:
Maurus Decimus
2026-05-14 15:36:34 +02:00
parent 8b1819b98e
commit 913bd86e03

View File

@@ -416,7 +416,7 @@ def split_email(addr: str) -> tuple[str, str] | None:
return None
return (local, domain)
_LABEL_RE = re.compile(r"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$")
_LABEL_RE = re.compile(r"^[^\W_](?:(?:[^\W_]|-){0,61}[^\W_])?$")
_RFC6761_RESERVED_TLDS = {"test", "local", "localhost", "invalid", "example"}
def is_valid_domain_name(name: str) -> bool: