From 89e970f450dd73463fd6960298b785367976e19e Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Mon, 9 Dec 2024 20:08:01 +0100 Subject: [PATCH] Accept domains with a label starting with an underscore. --- src/storage/zone.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/zone.cr b/src/storage/zone.cr index 4f644e1..3cd1e3f 100644 --- a/src/storage/zone.cr +++ b/src/storage/zone.cr @@ -7,7 +7,7 @@ def label_pattern end def subdomain_pattern - /\b(?:[0-9A-Za-z][0-9A-Za-z-]{0,62})(?:\.(?:[0-9A-Za-z][0-9A-Za-z-]{0,62}))*\b/ + /\b(?:[_0-9A-Za-z][0-9A-Za-z-]{0,62})(?:\.(?:[0-9A-Za-z][0-9A-Za-z-]{0,62}))*\b/ end # /^(((?!-))(xn--|_{1,1})?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.)*