Files
coredns/plugin/rewrite/reverter.go
Zhao Jianing fe9dffcd13 plugin/rewrite: Fixes a nil pointer dereference panic in ResponseReverter.WriteMsg (#8519)
ResponseReverter.WriteMsg calls res1.Copy() without checking res1 for
nil, so any plugin further down the chain that writes a nil response
(for example a handler returning (dns.RcodeSuccess, nil) after
w.WriteMsg(nil)) panics here.

Return an error instead, mirroring the nil guard recently added to
plugin/cache's ResponseWriter.WriteMsg (#8512).

Signed-off-by: zjncs <18910855655@163.com>
2026-09-04 18:02:52 -07:00

6.4 KiB