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 | |
parent | 01deed0941cabc3a38f07a6a44495140dae59809 (diff) | |
download | aports-827d5d09a2bbee7851d088f13cd8854eb4047702.tar.bz2 aports-827d5d09a2bbee7851d088f13cd8854eb4047702.tar.xz |
main/spamassassin: fix bad-regexp error
Diffstat (limited to 'main/spamassassin')
-rw-r--r-- | main/spamassassin/APKBUILD | 6 | ||||
-rw-r--r-- | main/spamassassin/bad-regexp-and-logic.patch | 36 |
2 files changed, 40 insertions, 2 deletions
diff --git a/main/spamassassin/APKBUILD b/main/spamassassin/APKBUILD index 6b2429db7d..0658804069 100644 --- a/main/spamassassin/APKBUILD +++ b/main/spamassassin/APKBUILD @@ -3,7 +3,7 @@ pkgname=spamassassin _pkgreal=Mail-SpamAssassin pkgver=3.4.1 -pkgrel=6 +pkgrel=7 pkgdesc="The Powerful #1 Open-Source Spam Filter" url="http://search.cpan.org/dist/Mail-SpamAssassin/" arch="all" @@ -20,6 +20,7 @@ source="http://search.cpan.org/CPAN/authors/id/K/KM/KMCGRAIL/${_pkgreal#*-}/$_pk spamd.crond net-dns-1.01-compat.patch Mail-SpamAssassin.patch + bad-regexp-and-logic.patch " builddir="$srcdir/$_pkgreal-$pkgver" @@ -78,4 +79,5 @@ sha512sums="6a074f1a4177e1969cef575fe3b1b844d27c813d48fe1e07a46f56ffa728fc780897 274d3aa0d9aab05e83c8d5ad3e93a457649360021a67c8cb19088365bed681ebe26889cfa86f8c46a6044c7ee969231f2a71e3227adf8ad9e38d0286b9caf48d spamd.confd c8c00e4281cefd5e5e15507c8890264a25aa59663c57ccdf7a77905e2550999cfbbfa7271189a9491b0a0e98dff432361f13becdb99e1b583cd9d45d68022a47 spamd.crond 7651b0b6a13322ecc338cd43ef67246c02c846162d419e3d1586e2d53161fc055d1ba80800f5210658cc360ac3ccd3c2176f1463780b0486ec65c0bac3b338fd net-dns-1.01-compat.patch -66a6daa7e9898864497e7d8e17efc6094aabc5a9a94afbc7da08acf4cf2430fad2cb0128b8db4be637f5dcabe3fa9f03490f9d7cbba3c1cc02b7824f63cd0965 Mail-SpamAssassin.patch" +66a6daa7e9898864497e7d8e17efc6094aabc5a9a94afbc7da08acf4cf2430fad2cb0128b8db4be637f5dcabe3fa9f03490f9d7cbba3c1cc02b7824f63cd0965 Mail-SpamAssassin.patch +fef24813fd643bcc3d945b1d53145c9290e8567ea4ed9c39a31cc0b0381a3949ef82840383f0c7dd4ac641f9dace6c08e39cf39e32b9906dc865f2fce1770c06 bad-regexp-and-logic.patch" 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 |