SA Bugzilla – Bug 2092
Yet another extra CRLF in Report field
Last modified: 2003-06-20 02:55:05 UTC
Headers (empty line before Content-Length: after X-Spam-Report:): Subject: XXX Date: Thu, 19 Jun 2003 12:57:02 +0400 Organization: ZAO Demos-Internet MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Checker-Version: SpamAssassin 2.60-cvs-mail.demos (1.193-2003-06-13-exp) X-Spam-Level: + X-Spam-Status: No, hits=1.1 required=5.0 tests=RU_WORD_SPAM2 autolearn=no version=2.60-cvs-mail.demos X-Spam-Report: * RU_WORD_SPAM2 1.1 (BODY: Spam word) Content-Length: 1550 Status: local.cf: rewrite_subject 1 subject_tag *****SPAM***** report_safe 0 fold_headers 1 add_header Flag spam _YESNOCAPS_ add_header Status all _YESNO_, hits=_HITS_ required=_REQD_ tests=_TESTS(,)_ autolearn=_AUTOLEARN_ version=_VERSION_ add_header Level all _STARS(+)_ add_header Checker-Version all SpamAssassin _VERSION_ (_SUBVERSION_) add_header Report all _REPORT_ #
have a nice 1 line patch for this. :)
Created attachment 1061 [details] trivial patch ... everything that calls _process_header will add a newline, so we can trim extra newlines ... :)
Do we have a test case for this?
+1 Sure
no, we don't have a test case for this. I suppose we could go make a small test message via GTUBE, pass it through SA, and make sure we end up with X paragraphs.
Sorry, by test case, I just meant a real-life example that triggered the problem.
hmm... doesn't that need a /s on that regexp to match \n?
Subject: Re: Yet another extra CRLF in Report field On Thu, Jun 19, 2003 at 09:31:22PM -0700, bugzilla-daemon@hughes-family.org wrote: > Sorry, by test case, I just meant a real-life example that triggered the problem. Oh. Take any message, add the _REPORT_ header, run through SA. The problem is that the REPORT lines have newlines at the end of each line. Then when it's added to the header, another newline is added.
Subject: Re: Yet another extra CRLF in Report field On Thu, Jun 19, 2003 at 10:32:04PM -0700, bugzilla-daemon@hughes-family.org wrote: > hmm... doesn't that need a /s on that regexp to match \n? I don't think so. /s lets . match \n, but we're not using . anywhere. I just want to trim the final newline off the string.
committed.