You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2004/02/23 03:01:34 UTC
[Bug 3075] New: fix remove_spamassassin_markup problem and add test
http://bugzilla.spamassassin.org/show_bug.cgi?id=3075
Summary: fix remove_spamassassin_markup problem and add test
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P5
Component: Libraries
AssignedTo: spamassassin-dev@incubator.apache.org
ReportedBy: quinlan@pathname.com
Gary Funck wrote:
Was reading over remove_spamassassin_markup to see what it does. Was
wondering about this
section of code:
foreach my $header ( keys %{$self->{conf}->{rewrite_header}} ) {
dbg ("Removing markup in $header");
if ($header eq 'Subject') {
my $tag = $self->{conf}->{rewrite_header}->{'Subject'};
$tag = quotemeta($tag);
$tag =~ s/_HITS_/\\d{2}\\.\\d{2}/g;
$tag =~ s/_SCORE_/\\d{2}\\.\\d{2}/g;
$tag =~ s/_REQD_/\\d{2}\\.\\d{2}/g;
1 while $hdrs =~ s/^Subject: ${tag} /Subject: /gm;
} else {
$hdrs =~ s/^(${header}: .*?)\t\([^)]\)$/$1/gm;
}
}
In particular, this line:
$hdrs =~ s/^(${header}: .*?)\t\([^)]\)$/$1/gm;
It looks like it is processing the headers designated for
rewrite and removing <tab>(...) at the end of the line,
where ... means anything inside the parens? But I think the
pattern needs iteration also: [^)]*? perhaps?
----------------------------------------
Theo Van Dinter replied:
hrm. yeah, I would think + would be required there (I think you're
guaranteed to have at least 1 char, although I suppose you could use
_STARS_ which could be 0...) Ok, so "*", yeah.
Sounds like we need a regression test for rewriting a non-Subject line
(iirc, from and to are the only other ones allowed)...
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.