Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: commits

svn commit: r834996 - /spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm

 

 

SpamAssassin commits RSS feed   Index | Next | Previous | View Threaded


mmartinec at apache

Nov 11, 2009, 10:12 AM

Post #1 of 1 (202 views)
Permalink
svn commit: r834996 - /spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm

Author: mmartinec
Date: Wed Nov 11 18:12:04 2009
New Revision: 834996

URL: http://svn.apache.org/viewvc?rev=834996&view=rev
Log:
Preventively local()-ize $1 in a couple of places in PerMsgStatus
in view of [perl #67962]

Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm?rev=834996&r1=834995&r2=834996&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/PerMsgStatus.pm Wed Nov 11 18:12:04 2009
@@ -553,6 +553,7 @@
chomp ($str); $str .= " [...]\n";

# in case the last line was huge, trim it back to around 200 chars
+ local $1;
$str =~ s/^(.{,200}).*$/$1/gs;

# now, some tidy-ups that make things look a bit prettier
@@ -888,6 +889,7 @@
# The tag should be a comment for this header ...
$tag = "($tag)" if ($hdr =~ /^(?:From|To)$/);

+ local $1;
s/^([^:]+:)[ \t]*(?:\Q${tag}\E )?/$1 ${tag} /i;
}

@@ -935,6 +937,7 @@

my @hexchars = split('', '0123456789abcdef');
my $ord;
+ local $1;
$text =~ s{([\x80-\xff])}{
$ord = ord $1;
'='.$hexchars[($ord & 0xf0) >> 4].$hexchars[$ord & 0x0f]
@@ -979,6 +982,7 @@
# a tag for it (bug 4793)
my $t;
my $v;
+ local($1,$2,$3);
$text =~ s{(_(\w+?)(?:\((.*?)\))?_)}{
my $full = $1;
my $tag = $2;
@@ -1566,6 +1570,7 @@

# special queries
if (defined $result && ($getaddr || $getname)) {
+ local $1;
$result =~ s/^[^:]+:(.*);\s*$/$1/gs; # 'undisclosed-recipients: ;'
$result =~ s/\s+/ /g; # reduce whitespace
$result =~ s/^\s+//; # leading whitespace
@@ -1589,6 +1594,7 @@
$result =~ s/(?<!<)"[^"]*"(?!@)//g; #" emacs
}
# Foo Blah <jm [at] xx> or <jm [at] xx>
+ local $1;
$result =~ s/^[^"<]*?<(.*?)>.*$/$1/;
# multiple addresses on one line? remove all but first
$result =~ s/,.*$//;
@@ -1604,6 +1610,7 @@
# "Foo Blah" <jm [at] fo>
# "'Foo Blah'" <jm [at] fo>
#
+ local $1;
$result =~ s/^[\'\"]*(.*?)[\'\"]*\s*<.+>\s*$/$1/g
or $result =~ s/^.+\s\((.*?)\)\s*$/$1/g; # jm [at] fo (Foo Blah)
}
@@ -1908,6 +1915,7 @@
# Bug 6225: untaint the string in an attempt to work around a perl crash
local $_ = untaint_var($entry);

+ local($1,$2,$3);
while (/$tbirdurire/igo) {
my $rawuri = $1||$2||$3;
$rawuri =~ s/(^[^(]*)\).*$/$1/; # as per ThunderBird, ) is an end delimiter if there is no ( preceeding it
@@ -1956,7 +1964,10 @@
my $domain = Mail::SpamAssassin::Util::uri_to_domain($cleanuri);
if ($domain) {
# bug 5780: Stop after domain to avoid FP, but do that after all deobfuscation of urlencoding and redirection
- $cleanuri =~ s/^(https?:\/\/[^:\/]+).*$/$1/ if $rblonly;
+ if ($rblonly) {
+ local $1;
+ $cleanuri =~ s/^(https?:\/\/[^:\/]+).*$/$1/;
+ }
push (@uris, $cleanuri);
$goodurifound = 1;
}

SpamAssassin commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.