From ee7ffb555dcd8d65c325448743e173f511ddb535 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Thu, 12 Jun 2025 11:43:44 +0200 Subject: [PATCH] rec: quote NTA reason retruned in negativetrustanchor.server and set answer to be variable --- pdns/recursordist/syncres.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pdns/recursordist/syncres.cc b/pdns/recursordist/syncres.cc index 6d29075199..33f20be91e 100644 --- a/pdns/recursordist/syncres.cc +++ b/pdns/recursordist/syncres.cc @@ -896,6 +896,7 @@ bool SyncRes::doSpecialNamesResolve(const DNSName& qname, const QType qtype, con ans << "\""; answers.emplace_back(QType::TXT, ans.str()); } + d_wasVariable = true; } } @@ -908,11 +909,12 @@ bool SyncRes::doSpecialNamesResolve(const DNSName& qname, const QType qtype, con ans << "\""; ans << negAnchor.first.toString(); // Explicit toString to have a trailing dot if (negAnchor.second.length() != 0) { - ans << " " << negAnchor.second; + ans << " " << txtEscape(negAnchor.second); } ans << "\""; answers.emplace_back(QType::TXT, ans.str()); } + d_wasVariable = true; } } -- 2.47.2