diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2006-03-24 02:30:36 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2006-03-24 02:30:36 +0000 |
commit | 2551760b4ccd0b487fb03836c3e6abcacf48b42e (patch) | |
tree | dc2bbbd1bbc3544c956290f7b11e94667f29c6bf /mail/spamass-milter | |
parent | 92b742910dc1233b6a2dc6adef8ead6906e7bf7b (diff) | |
download | ports-2551760b4ccd0b487fb03836c3e6abcacf48b42e.tar.gz ports-2551760b4ccd0b487fb03836c3e6abcacf48b42e.zip |
The recent change to SA-3.1.1 in PerMsgStatus.pm caused some headers
to leak into the displayed message when using spamass-milter, due to
the handing of LF/CR.
Dan Nelson, the author of Spamass-Milter, kindly replicated the
problem and provided the patch.
Submitted by: Forrest Aldrich <forrie__at__forrie.com>
Notes
Notes:
svn path=/head/; revision=158046
Diffstat (limited to 'mail/spamass-milter')
-rw-r--r-- | mail/spamass-milter/Makefile | 1 | ||||
-rw-r--r-- | mail/spamass-milter/files/patch-spamass-milter.cpp | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/mail/spamass-milter/Makefile b/mail/spamass-milter/Makefile index 1f1cc44df214..acc01f7b807e 100644 --- a/mail/spamass-milter/Makefile +++ b/mail/spamass-milter/Makefile @@ -7,6 +7,7 @@ PORTNAME= spamass-milter PORTVERSION= 0.3.0 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SAVANNAH} MASTER_SITE_SUBDIR= spamass-milt diff --git a/mail/spamass-milter/files/patch-spamass-milter.cpp b/mail/spamass-milter/files/patch-spamass-milter.cpp new file mode 100644 index 000000000000..2bef5a151b9c --- /dev/null +++ b/mail/spamass-milter/files/patch-spamass-milter.cpp @@ -0,0 +1,24 @@ +Index: spamass-milter.cpp +diff -u spamass-milter.cpp.orig spamass-milter.cpp +--- spamass-milter.cpp.orig Sat Feb 5 16:03:22 2005 ++++ spamass-milter.cpp Fri Mar 24 11:10:53 2006 +@@ -678,9 +678,16 @@ + if (header[field_end-1] == '\r') + field_end--; + +- // Maybe remove the whitespace picked up when a header wraps - this +- // might actually be a requirement +- return header.substr( field_start, field_end - field_start ); ++ string data = header.substr( field_start, field_end - field_start ); ++ ++ /* Replace all CRLF pairs with LF */ ++ idx = 0; ++ while ( (idx = data.find("\r\n", idx)) != string::npos ) ++ { ++ data.replace(idx,2,"\n"); ++ } ++ ++ return data; + } + + |