aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yong Tang <yong.tang.github@outlook.com> 2019-08-21 08:01:45 -0700
committerGravatar Chris O'Haver <cohaver@infoblox.com> 2019-08-21 11:01:45 -0400
commit1b3fb834daec02aedbb7624622edc34c1420c850 (patch)
tree5cf8a78a37b6b78dbe449a59f50ad14a26e3f1b5
parentf888c5f7f62e8f789fe4939faaa9e3b3a3f7c554 (diff)
downloadcoredns-1b3fb834daec02aedbb7624622edc34c1420c850.tar.gz
coredns-1b3fb834daec02aedbb7624622edc34c1420c850.tar.zst
coredns-1b3fb834daec02aedbb7624622edc34c1420c850.zip
Revert "Validate zone during normalization (#3165)" (#3167)
This reverts commit f888c5f7f62e8f789fe4939faaa9e3b3a3f7c554.
-rw-r--r--core/dnsserver/address.go9
-rw-r--r--core/dnsserver/address_test.go1
2 files changed, 1 insertions, 9 deletions
diff --git a/core/dnsserver/address.go b/core/dnsserver/address.go
index 9146ef650..1a69c33b8 100644
--- a/core/dnsserver/address.go
+++ b/core/dnsserver/address.go
@@ -3,7 +3,6 @@ package dnsserver
import (
"fmt"
"net"
- "net/url"
"strings"
"github.com/coredns/coredns/plugin"
@@ -53,13 +52,7 @@ func normalizeZone(str string) (zoneAddr, error) {
}
}
- z := zoneAddr{Zone: dns.Fqdn(host), Port: port, Transport: trans, IPNet: ipnet}
- _, err = url.ParseRequestURI(z.String())
- if err != nil {
- return zoneAddr{}, err
- }
-
- return z, nil
+ return zoneAddr{Zone: dns.Fqdn(host), Port: port, Transport: trans, IPNet: ipnet}, nil
}
// SplitProtocolHostPort splits a full formed address like "dns://[::1]:53" into parts.
diff --git a/core/dnsserver/address_test.go b/core/dnsserver/address_test.go
index 86360d8f0..6d4d0beab 100644
--- a/core/dnsserver/address_test.go
+++ b/core/dnsserver/address_test.go
@@ -28,7 +28,6 @@ func TestNormalizeZone(t *testing.T) {
{"https://.:8443", "https://.:8443", false},
{"https://..", "://:", true},
{"https://.:", "://:", true},
- {"dns://.:1053{.:53", "://:", true},
} {
addr, err := normalizeZone(test.input)
actual := addr.String()