]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Be sure to escape user data when building a TXT record. 17442/head
authorMiod Vallat <miod.vallat@powerdns.com>
Wed, 20 May 2026 07:31:40 +0000 (09:31 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Wed, 20 May 2026 08:18:57 +0000 (10:18 +0200)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
pdns/auth-catalogzone.cc

index f791f80516cedbf02a273bd41c013d5d1c3b3df3..0c9cd10a85a6c2cfbe45e282b1a90e769453e731 100644 (file)
@@ -162,7 +162,7 @@ void CatalogInfo::toDNSZoneRecords(const ZoneName& zone, vector<DNSZoneRecord>&
   for (const auto& group : d_group) {
     dzr.dr.d_name = g_groupdnsname + prefix;
     dzr.dr.d_type = QType::TXT;
-    dzr.dr.setContent(std::make_shared<TXTRecordContent>("\"" + group + "\""));
+    dzr.dr.setContent(std::make_shared<TXTRecordContent>("\"" + txtEscape(group) + "\""));
     dzrs.emplace_back(dzr);
   }
 }