From: bert hubert Date: Tue, 28 Nov 2017 09:50:24 +0000 (+0100) Subject: quote server-id. This stops us from breaking serving chaos txt id.server if your... X-Git-Tag: auth-4.1.0~2^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e684fda343a050de727f360e9b4d21a4e031f4a;p=pdns quote server-id. This stops us from breaking serving chaos txt id.server if your server has a dash or a dot or an underscore in its name. --- diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 3b3bcbd16..028f6d32a 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -274,7 +274,10 @@ int PacketHandler::doChaosRequest(DNSPacket *p, DNSPacket *r, DNSName &target) r->setRcode(RCode::Refused); return 0; } - rr.dr.d_content=DNSRecordContent::mastermake(QType::TXT, 1, id); + string tid=id; + if(!tid.empty() && tid[0]!='"') // see #6010 however + tid = "\"" + tid + "\""; + rr.dr.d_content=DNSRecordContent::mastermake(QType::TXT, 1, tid); } else { r->setRcode(RCode::Refused);