core/dnsserver: make TsigSecret public (#8434)

NewServer aggregates secrets from all assigned sites and the final value
can only be reached by plugins via dnsserver.Server

Signed-off-by: Ilya Kulakov <kulakov.ilya@gmail.com>
This commit is contained in:
Ilya Kulakov
2026-09-15 20:02:49 -07:00
committed by GitHub
parent 14ed42bd1f
commit 1e550ac71a
9 changed files with 25 additions and 25 deletions

View File

@@ -234,9 +234,9 @@ func (s *ServerHTTPS) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
if tsig := msg.IsTsig(); tsig != nil {
if s.tsigSecret == nil {
if s.TsigSecret == nil {
dw.tsigStatus = dns.ErrSecret
} else if secret, ok := s.tsigSecret[tsig.Hdr.Name]; !ok {
} else if secret, ok := s.TsigSecret[tsig.Hdr.Name]; !ok {
dw.tsigStatus = dns.ErrSecret
} else {
dw.tsigStatus = dns.TsigVerify(raw, secret, "", false)