[Pdns-users] TXT record with embedded tab causes thread to die.
Christopher Pruden
cdpruden at liquidweb.com
Tue Mar 27 15:09:29 UTC 2012
>> On Tue, Mar 27, 2012 at 09:43:27AM -0400, Christopher Pruden wrote:
>>> Hi,
>>>
>>> I'm working on a PowerDNS setup, with the gpgsql backend, and think I'm running into ticket #356. I tried this with 3.0.1 initially, and now 3.1rc1 (static RPM for both).
>>>
>>> Initially, data was loaded by setting PowerDNS as a slave to a bind master, and using AXFR to get everything across. This seemed to work well, although I've found a few records that ended up in the DB that can't be retrieved. Specifically, it seems to be TXT records with an embedded tab (the greater than sign is the tab):
I believe I've found the spot that is causing this issue. I haven't tested this patch, as I've run into trouble getting PowerDNS to compile on Cent, but I believe the below patch (against svn) would take care of it. I suspect there are other characters that should be handled in it as well though -- vertical tab, maybe \r, etc.
Index: pdns/dnsparser.cc
===================================================================
--- pdns/dnsparser.cc (revision 2538)
+++ pdns/dnsparser.cc (working copy)
@@ -393,6 +393,9 @@
if(*i=='\n') { // XXX FIXME this should do a way better job!
ret += "\\010";
}
+ else if(*i=='\t') {
+ ret += "\\009";
+ }
else if(*i=='"' || *i=='\\'){
ret += '\\';
ret += *i;
More information about the Pdns-users
mailing list