]> granicus.if.org Git - pdns/commitdiff
auth: make sure upcase qnames do not confuse rectify or axfr
authorKees Monshouwer <mind04@monshouwer.org>
Sun, 4 Jun 2017 11:27:07 +0000 (13:27 +0200)
committermind04 <mind04@monshouwer.org>
Sun, 4 Jun 2017 23:21:22 +0000 (01:21 +0200)
pdns/lua-auth.cc
pdns/pdnsutil.cc
pdns/tcpreceiver.cc

index 18dfd7a306c2f47328c8557406e0f9cbb98dcb83..40f09656d1ee96707d2ab7f44a548c265ae9204f 100644 (file)
@@ -149,6 +149,7 @@ bool AuthLua::axfrfilter(const ComboAddress& remote, const DNSName& zone, const
     lua_pop(d_lua, 1); // table
 
     //    cerr<<"Adding content '"<<rr.content<<"' with place "<<(int)rr.d_place<<" \n";
+    rr.qname.makeUsLowerCase();
     out.push_back(rr);
   }
   lua_pop(d_lua, 2); // c
index fe7a4d0c7f152d012db08ef22274185fbc6ff56b..50e30fe10dc9c833f649ce104b91165817bbe247 100644 (file)
@@ -165,6 +165,7 @@ bool rectifyZone(DNSSECKeeper& dk, const DNSName& zone)
   vector<DNSResourceRecord> rrs;
 
   while(sd.db->get(rr)) {
+    rr.qname.makeUsLowerCase();
     if (rr.qtype.getCode())
     {
       rrs.push_back(rr);
index 837aa86cd74d66507c4d1f17f2dbe7752b65434f..34339835fc673573b9a6506e9e82c7c7e0fd2731 100644 (file)
@@ -751,6 +751,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr<DNSPacket> q, int ou
     rrs.push_back(rr);
 
   while(sd.db->get(rr)) {
+    rr.qname.makeUsLowerCase();
     if(rr.qname.isPartOf(target)) {
       if (rr.qtype.getCode() == QType::ALIAS && ::arg().mustDo("outgoing-axfr-expand-alias")) {
         vector<DNSResourceRecord> ips;