From 0e761b1c5e695e24363ebbe78b3bff4104944f1c Mon Sep 17 00:00:00 2001 From: Viktor Liu Date: Thu, 12 Dec 2024 11:36:35 +0100 Subject: [PATCH] Revert domain regex --- management/server/http/routes_handler.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/management/server/http/routes_handler.go b/management/server/http/routes_handler.go index 0b469cd08..f44a164e2 100644 --- a/management/server/http/routes_handler.go +++ b/management/server/http/routes_handler.go @@ -350,8 +350,7 @@ func validateDomains(domains []string) (domain.List, error) { return nil, fmt.Errorf("domains list exceeds maximum allowed domains: %d", maxDomains) } - domainRegex := regexp.MustCompile(``) - //domainRegex := regexp.MustCompile(`^(?:(?:xn--)?[a-zA-Z0-9_](?:[a-zA-Z0-9-_]{0,61}[a-zA-Z0-9])?\.)*(?:xn--)?[a-zA-Z0-9](?:[a-zA-Z0-9-_]{0,61}[a-zA-Z0-9])?$`) + domainRegex := regexp.MustCompile(`^(?:(?:xn--)?[a-zA-Z0-9_](?:[a-zA-Z0-9-_]{0,61}[a-zA-Z0-9])?\.)*(?:xn--)?[a-zA-Z0-9](?:[a-zA-Z0-9-_]{0,61}[a-zA-Z0-9])?$`) var domainList domain.List