Last Comment Bug 715922 - pop3 move mail filters with quarantining turned off or download size limit get the resulting message size too big by two bytes
: pop3 move mail filters with quarantining turned off or download size limit ge...
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: Thunderbird 12.0
Assigned To: David :Bienvenu
:
Mentors:
Depends on:
Blocks: 402392
  Show dependency treegraph
 
Reported: 2012-01-06 08:52 PST by David :Bienvenu
Modified: 2012-04-03 14:22 PDT (History)
4 users (show)
mozilla: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed


Attachments
proposed fix (1.45 KB, patch)
2012-01-11 09:00 PST, David :Bienvenu
no flags Details | Diff | Splinter Review
fix with unit test (4.06 KB, patch)
2012-01-13 16:16 PST, David :Bienvenu
standard8: review+
Details | Diff | Splinter Review
fix msg download limiting case (2.68 KB, patch)
2012-04-03 12:56 PDT, David :Bienvenu
standard8: review+
standard8: approval‑comm‑beta+
standard8: approval‑comm‑release+
Details | Diff | Splinter Review

Description David :Bienvenu 2012-01-06 08:52:46 PST
If message quarantining is turned off (not the default), pop3 incoming move mail filters get the message size wrong by two bytes too many in the resulting msg hdr. This is relatively harmless, but obviously should be fixed. I suspect this is a flush issue.
Comment 1 David :Bienvenu 2012-01-11 09:00:43 PST
Created attachment 587720 [details] [diff] [review]
proposed fix

I'll try to see if I can come up with a unit test for this.
Comment 2 David :Bienvenu 2012-01-13 16:16:26 PST
Created attachment 588559 [details] [diff] [review]
fix with unit test

This makes sure we flush full messages, and extends the pop3FilterMove test to test that the message is right. In debug builds, we assert, w/o the core change, and I believe in release mode it'll fail as well.
Comment 3 David :Bienvenu 2012-01-17 07:44:11 PST
fix checked in - http://hg.mozilla.org/comm-central/rev/986abadfbeb7
Comment 4 David :Bienvenu 2012-04-03 12:56:05 PDT
Created attachment 611945 [details] [diff] [review]
fix msg download limiting case

We have the exact same issue if message download limit is set. So I'm just always going to flush. Extended unit test to test for this as well.
Comment 5 David :Bienvenu 2012-04-03 13:23:08 PDT
follow-on fix landed on trunk - http://hg.mozilla.org/comm-central/rev/9843a6596561
Comment 6 David :Bienvenu 2012-04-03 14:11:27 PDT
and backed out and relanded - http://hg.mozilla.org/comm-central/rev/cb2b8fd3f517
Comment 7 Mark Banner (:standard8) (afk until 26th July) 2012-04-03 14:22:55 PDT
Checked into branches:

http://hg.mozilla.org/releases/comm-aurora/rev/9306cdde5483
http://hg.mozilla.org/releases/comm-beta/rev/9bdfa24dedd9

Note You need to log in before you can comment on or make changes to this bug.