aboutsummaryrefslogtreecommitdiff
path: root/core/dnsserver/server_https.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2021-01-15 19:26:04 +0100
committerGravatar GitHub <noreply@github.com> 2021-01-15 18:26:04 +0000
commit342eae9b4b1791da8fb92d36b3968839f3f38b94 (patch)
tree8ed2b47ecb8005fe68e007254dbfc355f1d2e83f /core/dnsserver/server_https.go
parentf5f977f4c8c6e77a8908ebd9fce781a74c26374e (diff)
downloadcoredns-342eae9b4b1791da8fb92d36b3968839f3f38b94.tar.gz
coredns-342eae9b4b1791da8fb92d36b3968839f3f38b94.tar.zst
coredns-342eae9b4b1791da8fb92d36b3968839f3f38b94.zip
plugin/file: guard against cname loops (#4387)
Automatically submitted.
Diffstat (limited to 'core/dnsserver/server_https.go')
-rw-r--r--core/dnsserver/server_https.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/dnsserver/server_https.go b/core/dnsserver/server_https.go
index 057dac49c..7292311e8 100644
--- a/core/dnsserver/server_https.go
+++ b/core/dnsserver/server_https.go
@@ -145,6 +145,7 @@ func (s *ServerHTTPS) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// We just call the normal chain handler - all error handling is done there.
// We should expect a packet to be returned that we can send to the client.
ctx := context.WithValue(context.Background(), Key{}, s.Server)
+ ctx = context.WithValue(ctx, LoopKey{}, 0)
s.ServeDNS(ctx, dw, msg)
// See section 4.2.1 of RFC 8484.