diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2017-08-07 15:08:45 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2017-08-07 15:08:45 +0000 |
commit | 827d5d09a2bbee7851d088f13cd8854eb4047702 (patch) | |
tree | 4cc151d032e9793cc1a462091a222ea501383074 /main/spamassassin/bad-regexp-and-logic.patch | |
parent | 01deed0941cabc3a38f07a6a44495140dae59809 (diff) | |
download | aports-827d5d09a2bbee7851d088f13cd8854eb4047702.tar.bz2 aports-827d5d09a2bbee7851d088f13cd8854eb4047702.tar.xz |
main/spamassassin: fix bad-regexp error
Diffstat (limited to 'main/spamassassin/bad-regexp-and-logic.patch')
-rw-r--r-- | main/spamassassin/bad-regexp-and-logic.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/main/spamassassin/bad-regexp-and-logic.patch b/main/spamassassin/bad-regexp-and-logic.patch new file mode 100644 index 0000000000..62a537b3d7 --- /dev/null +++ b/main/spamassassin/bad-regexp-and-logic.patch @@ -0,0 +1,36 @@ +From edb00a8d76a625bf03227ee2f6e915c9a0d90bad Mon Sep 17 00:00:00 2001 +From: Mark Martinec <mmartinec@apache.org> +Date: Tue, 11 Apr 2017 18:37:20 +0000 +Subject: [PATCH] Bug 7404: Bad regexp (and logic) in + MS::PerMsgStatus::get_content_preview + +git-svn-id: https://svn.apache.org/repos/asf/spamassassin/trunk@1791010 13f79535-47bb-0310-9956-ffa450edef68 +--- + lib/Mail/SpamAssassin/PerMsgStatus.pm | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/lib/Mail/SpamAssassin/PerMsgStatus.pm b/lib/Mail/SpamAssassin/PerMsgStatus.pm +index f8c55061b..126157bf5 100644 +--- a/lib/Mail/SpamAssassin/PerMsgStatus.pm ++++ b/lib/Mail/SpamAssassin/PerMsgStatus.pm +@@ -896,16 +896,16 @@ sub get_content_preview { + $str .= shift @{$ary}; + } + undef $ary; +- 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; ++ $str =~ s/^(.{200}).+$/$1 [...]/gm; ++ chomp ($str); $str .= "\n"; + + # now, some tidy-ups that make things look a bit prettier +- $str =~ s/-----Original Message-----.*$//gs; ++ $str =~ s/-----Original Message-----.*$//gm; + $str =~ s/This is a multi-part message in MIME format\.//gs; +- $str =~ s/[-_\*\.]{10,}//gs; ++ $str =~ s/[-_*.]{10,}//gs; + $str =~ s/\s+/ /gs; + + # add "Content preview:" ourselves, so that the text aligns |