]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: limit long version strings to 63 characters and catch exceptions in secpoll
authorKees Monshouwer <mind04@monshouwer.org>
Tue, 13 Jan 2015 11:54:27 +0000 (12:54 +0100)
committermind04 <mind04@monshouwer.org>
Tue, 13 Jan 2015 12:14:55 +0000 (13:14 +0100)
pdns/common_startup.cc
pdns/secpoll-auth.cc

index a1feccbaa2120b3cc92645462aabdef544eed64f..189505b300f526062c2c138b71a4f18aed544217 100644 (file)
@@ -440,7 +440,10 @@ void mainthread()
    DNSPacket::s_udpTruncationThreshold = std::max(512, ::arg().asNum("udp-truncation-threshold"));
    DNSPacket::s_doEDNSSubnetProcessing = ::arg().mustDo("edns-subnet-processing");
 
-   doSecPoll(true); // this must be BEFORE chroot
+   try {
+     doSecPoll(true); // this must be BEFORE chroot
+   }
+   catch(...) {}
 
    if(!::arg()["chroot"].empty()) {  
      triggerLoadOfLibraries();
index 84b3a1a91424341f282100735a5f942b9dad9df9..cf9cc8ff569c5b5e46056ffdf11256cec37c4d33 100644 (file)
@@ -124,7 +124,8 @@ void doSecPoll(bool first)
   struct timeval now;
   gettimeofday(&now, 0);
 
-  string query = "auth-" + string(PACKAGEVERSION) +".security-status."+::arg()["security-poll-suffix"];
+  string version = "auth-" + string(PACKAGEVERSION);
+  string query = version.substr(0, 63) +".security-status."+::arg()["security-poll-suffix"];
 
   if(*query.rbegin()!='.')
     query+='.';