You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Todd Rinaldo <to...@cpanel.net> on 2012/12/07 05:56:56 UTC

Bug tracker down?

I tried to report to the bug tracker but it's down: https://issues.apache.org/SpamAssassin/

Net::DNS has broken sa-update - https://rt.cpan.org/Ticket/Display.html?id=81760

This patch to sa-update would work around Net::DNS 0.70. $1 should never be used anyways unless you're sure the regex matched. It's just asking for trouble. Also local $1 makes me nervous. It could potentially behave different on different versions of perl depending on if bugs existed with local or $1. 


Re: Bug tracker down?

Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 12/7/2012 9:16 AM, Mark Martinec wrote:
> Interesting. The Net::DNS 0.68 docs claim:
>
>    man Net::DNS::RR::TXT
>
>     char_str_list
>          print "Individual <character-string> list: \n\t",
>                join("\n\t", $rr->char_str_list());
>         Returns a list of the individual <character-string> elements, as
>         unquoted strings.  Used by TXT->rdatastr and TXT->rr_rdata.
>
>         NB: rdatastr will return quoted strings.
>
> But the inserted quotation marks seem silly indeed.
Thanks Mark for reviewing this.  And Todd, good catch.  I agree with 
Mark's patch re: local but otherwise a good fix.
Regards,
KAM

Re: Bug tracker down?

Posted by Mark Martinec <Ma...@ijs.si>.
> I tried to report to the bug tracker but it's down:
> https://issues.apache.org/SpamAssassin/

Don't know, seems fine now.
Please open a PR anyway for documentation purposes.

> Net::DNS has broken sa-update -
> https://rt.cpan.org/Ticket/Display.html?id=81760

Interesting. The Net::DNS 0.68 docs claim:

  man Net::DNS::RR::TXT

   char_str_list
        print "Individual <character-string> list: \n\t",
              join("\n\t", $rr->char_str_list());
       Returns a list of the individual <character-string> elements, as
       unquoted strings.  Used by TXT->rdatastr and TXT->rr_rdata.

       NB: rdatastr will return quoted strings.

But the inserted quotation marks seem silly indeed.

> This patch to sa-update would work around Net::DNS 0.70. $1 should never be
> used anyways unless you're sure the regex matched. It's just asking for
> trouble.

Thanks, fixed now in trunk, r1418317.
Used the same approach/code for sa-update, as was properly used
in SpamAssassin/Dns.pm.

> Also local $1 makes me nervous. It could potentially behave
> different on different versions of perl depending on if bugs existed with
> local or $1.

It's the other way around: missing local($1) could behave differently
depending on a version of perl. Having global $n variables localized
before use makes them undefined and taint-free, and avoids potentially
polluting the same variable used by a caller when invoking some subroutine
or hitting an exception handler. This applies to any version of perl,
it makes a good practice.

  Mark