]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: quote NTA reason retruned in negativetrustanchor.server and set answer to be...
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 12 Jun 2025 09:43:44 +0000 (11:43 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 12 Jun 2025 09:46:59 +0000 (11:46 +0200)
pdns/recursordist/syncres.cc

index 6d29075199c56b7d8d24a79b9d5476266e718a96..33f20be91ec15517de19099d10039859ce4a77c9 100644 (file)
@@ -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;
     }
   }