upgrade from pdns 2.9.22 to pdns-static-3.0-1 breaks DKIM TXT records #395

Closed
Habbie opened this Issue Apr 26, 2013 · 2 comments

Projects

None yet

1 participant

@Habbie
Member
Habbie commented Apr 26, 2013

Hi,

I have DKIM TXT records of this format in our postgresql DB

psql -t -q --no-align -U postgres -d manageddns -c "SELECT rr_value FROM resource_records WHERE fqdn = '' AND status = 'Active';"

"v=DKIM1; g=*; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCfHJwoT7mD5rJIhjdFhOpgv3iWQtq0G/zGUXj/
JWJ2ljLq87Zx/f/4yBaLPbxkuUMCWJXNhHY3DjoFW8HajSRWpq9/Ot1oA5GAvNbjx81QbMpywjng
pEileEOnHR2HADpUfjGISsxIJT61eQ7jtYklTEykPkohPtx8wvOP8lCJfQIDAQAB"

This string contains newlines. With pdns-static-3.0-1 i get the below error

Oct 12 15:40:00 xxx pdns[973]: Exception building answer packet (Unable to parse DNS TXT '"v=DKIM1; g=*; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCfHJwoT7mD5rJIhjdFhOpgv3iWQtq0G/zGUXj/
JWJ2ljLq87Zx/f/4yBaLPbxkuUMCWJXNhHY3DjoFW8HajSRWpq9/Ot1oA5GAvNbjx81QbMpywjng
pEileEOnHR2HADpUfjGISsxIJT61eQ7jtYklTEykPkohPtx8wvOP8lCJfQIDAQAB"
') sending out servfail

With version pdns 2.9.22 it works fine.

Hope this helps to resolve the problem - let me know if any further info is needed.

Thanks

@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
@Habbie
Member
Habbie commented Apr 26, 2013

Author: peter
--- pdns/dnslabeltext.rl (revision 2283)
+++ pdns/dnslabeltext.rl (working copy)
@@ -62,7 +62,7 @@
}

            escaped = '\\' ((["\\]@reportEscaped) | ([0-9]{3}$reportEscapedNumber%doneEscapedNumber));
  •            plain = (print-'\'-'"') $ reportPlain;
    
  •            plain = ((print-'\\'-'"')|'\n') $ reportPlain;
            txtElement = escaped | plain;
    
            main := (('"' txtElement* '"' space?) >segmentBegin %segmentEnd)+;
    

This patch should fix it. Will go into SVN soon.

@Habbie
Member
Habbie commented Apr 26, 2013

Author: ahu
fixed in commit 2394

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment