Bladeren bron

allow underscore in domain name. fixes #917

Darien Raymond 7 jaren geleden
bovenliggende
commit
a52eb8f82b
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      common/protocol/address.go

+ 1 - 1
common/protocol/address.go

@@ -61,7 +61,7 @@ func maybeIPPrefix(b byte) bool {
 
 func isValidDomain(d string) bool {
 	for _, c := range d {
-		if !((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '-' || c == '.') {
+		if !((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '-' || c == '.' || c == '_') {
 			return false
 		}
 	}