From ec68dde647fd9c75272d51330f078234893ddaf6 Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Fri, 29 Apr 2016 08:45:54 -0700 Subject: [PATCH] Only allow * and ? as entire DNS name labels --- identifiers.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/identifiers.go b/identifiers.go index af7a9ca..5109af3 100644 --- a/identifiers.go +++ b/identifiers.go @@ -73,10 +73,12 @@ func isValidDNSLabelChar (ch rune) bool { return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') || - ch == '-' || ch == '_' || - ch == '*' || ch == '?'; + ch == '-' || ch == '_'; } func isValidDNSLabel (label string) bool { + if label == "*" || label == "?" { + return true + } for _, ch := range label { if !isValidDNSLabelChar(ch) { return false