Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 81760
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: TODDR [...] cpan.org
Cc: rsrchboy [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: 0.69
Fixed in: (no value)



Subject: Net::DNS 0.69 breaks Mail::SpamAssassin
Mail::SpamAssassin depended on this code to return a quoted number: $>perl -MData::Dumper -MNet::DNS -e'print "\nNet::DNS::VERSION=$Net::DNS::VERSION\n"; my $res = Net::DNS::Resolver->new(); my $RR = $res->query("1.3.3.updates.spamassassin.org", "TXT"); foreach my $rr ($RR->answer) { my $txt = $rr->rdatastr; print "$txt\n"}' Net::DNS::VERSION=0.68 "1417778" But in 0.69 and 0.70, it does this: $>perl -MData::Dumper -MNet::DNS -e'print "\nNet::DNS::VERSION=$Net::DNS::VERSION\n"; my $res = Net::DNS::Resolver->new(); my $RR = $res->query("1.3.3.updates.spamassassin.org", "TXT"); foreach my $rr ($RR->answer) { my $txt = $rr->rdatastr; print "$txt\n"}' Net::DNS::VERSION=0.69 1417778 This breaks the Mail::SpamAssassin. Given it breaks backwards compatibility break, could this be put back please?
We can not have that! We're working towards a satisfactory solution right now. I guess Net::DNS 0.71 will be released shortly... On Thu 06 Dec 2012 23:33:16, TODDR wrote: Show quoted text
> Mail::SpamAssassin depended on this code to return a quoted number: > > $>perl -MData::Dumper -MNet::DNS -e'print > "\nNet::DNS::VERSION=$Net::DNS::VERSION\n"; > my $res = Net::DNS::Resolver->new(); > my $RR = $res->query("1.3.3.updates.spamassassin.org", "TXT"); > foreach my $rr ($RR->answer) { > my $txt = $rr->rdatastr; print "$txt\n"}' > > Net::DNS::VERSION=0.68 > "1417778" > > But in 0.69 and 0.70, it does this: > $>perl -MData::Dumper -MNet::DNS -e'print > "\nNet::DNS::VERSION=$Net::DNS::VERSION\n"; > my $res = Net::DNS::Resolver->new(); > my $RR = $res->query("1.3.3.updates.spamassassin.org", "TXT"); > foreach my $rr ($RR->answer) { > my $txt = $rr->rdatastr; print "$txt\n"}' > > Net::DNS::VERSION=0.69 > 1417778 > > This breaks the Mail::SpamAssassin. Given it breaks backwards > compatibility break, could this > be put back please?
On Fri Dec 07 03:22:05 2012, NLNETLABS wrote: Show quoted text
> We can not have that! We're working towards a satisfactory solution > right now. I guess Net::DNS 0.71 will be released shortly... >
Thanks! SA is slow to release so this is definitely the easier fix. Here's a cross link to the ticket I opened with them for completeness. https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6872
From: rwfranks [...] acm.org
On Thu Dec 06 23:33:16 2012, TODDR wrote: Show quoted text
> Mail::SpamAssassin depended on this code to return a quoted number:
Show quoted text
> This breaks the Mail::SpamAssassin. Given it breaks backwards > compatibility break, could this > be put back please?
Only if it is absolutely unavoidable, and then only as a short term measure. rdatastr() returns the RHS of an RR string in zone file syntax defined in RFC1035. RFC1035 permits strings in zone files to be either quoted or a string of contiguous characters (with no quotes). The post-0.68 implementation is fully compliant with RFC1035, although we now exploit more of that permitted behaviour than in previous versions. SpamAssassin is therefore making the entirely unwarranted assumption that all strings returned by rdatastr() will be quoted. The reason for revisiting the whole issue of escaping and quoting is to enable strings in TXT RRs to contain strings using non-Latin scripts. Chucking in gratuitous ASCII quotes in foreign language text is decidedly unwelcome to users of those languages. If you are intending to process the information in the string, the problem you now have can be avoided by using $rr->txtdata() instead of rdatastr(). If you call this in scalar context, the entire RHS of the TXT record will be returned as a single string, without any of the quotes or escape sequences which are only added to the zone file strings. rdatastr() is actually part of the old (pre 0.69) interface between RR.pm and the subtype implementations. It only continues to work now because there is a compatibility layer allowing both old and new RR subtype architectures to coexist. This may disappear entirely when compatibility mode is switched off, although this is unlikely to happen anytime soon. Dick
RT-Send-CC: rwfranks [...] acm.org
I'm not against you taking the stance that it was previously broken and now it's fixed. In the SA ticket, they agreed with your comment that the spec/man page are now conformed to whereas they were not previously.
From: rwfranks [...] acm.org
On Fri Dec 07 12:32:23 2012, TODDR wrote: Show quoted text
> I'm not against you taking the stance that it was previously broken > and now it's fixed.
It was not really broken; there was just no pressing need to make use of the unquoted form until we had to deal with the complications of non-ASCII text. Show quoted text
> In the SA ticket, they agreed with your comment that the spec/man page > are now conformed to > whereas they were not previously.
So we all agree that the action is on SA and Net::DNS is to stay as it now (0.70) is.
Hi Todd, As you have probably seen, we have discussed the issue with SpamAssassin developers and agreed upon an solution in which we put the quotes back until a version of SpamAssassin is released that has the issue resolved; which, they say, will be within three months. Thank you for noticing and reporting this rather critical issue. Much appreciated! -- Willem
From: rwfranks [...] acm.org
On Sun Dec 16 11:56:09 2012, NLNETLABS wrote: [snip] Show quoted text
> ... agreed upon an solution in which we put the quotes back > until a version of SpamAssassin is released that has the issue resolved; > which, they say, will be within three months. >
after which, the workaraound will be removed
Workaround will be removed in upcoming 0.79 release