> 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

Reply via email to