From 3d798f0cbb6f511a2a9785f0782b9bcee6745510 Mon Sep 17 00:00:00 2001 From: jorgepastorr Date: Mon, 26 Feb 2024 14:04:16 +0100 Subject: [PATCH] allow _ in CNAMEs --- orchestra/contrib/domains/validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchestra/contrib/domains/validators.py b/orchestra/contrib/domains/validators.py index cf34e86e..33ca856a 100644 --- a/orchestra/contrib/domains/validators.py +++ b/orchestra/contrib/domains/validators.py @@ -53,7 +53,7 @@ def validate_zone_label(value): Labels may not be all numbers, but may have a leading digit (e.g., 3com.com). Labels must end and begin only with a letter or digit. See [RFC 1035] and [RFC 1123]. """ - if not re.match(r'^[a-z0-9][\.\-0-9a-z]*[\.0-9a-z]$', value): + if not re.match(r'^[a-z0-9][\.\-0-9a-z_]*[\.0-9a-z]$', value): msg = _("Labels must start and end with a letter or digit, " "and have as interior characters only letters, digits, and hyphen.") raise ValidationError(msg)