The default bug view has changed. See this FAQ.

Detaching attachment from complex MIME message rewrites message incorrectly

RESOLVED FIXED

Status

MailNews Core
Attachments
RESOLVED FIXED
12 years ago
9 years ago

People

(Reporter: Mike Cowperthwaite, Assigned: Bienvenu)

Tracking

({fixed1.8})

Trunk
fixed1.8
Bug Flags:
blocking1.8b5 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

945 bytes, patch
Scott MacGregor
: superreview+
Scott MacGregor
: approval1.8b5+
Details | Diff | Splinter Review
(Reporter)

Description

12 years ago
Spun off from bug 286446.

Given a complex message, such as:
  multipart/related
   multipart/alternative
    text/plain
    text/html
   application/msword

After detaching the attachment, the resulting message includes two copies of
the text/html body, one of which is hidden between MIME boundaries (without 
headers of its own):

   multipart/related; boundary=XXX
     --XXX
     multipart/alternative; boundary=YYY
       --YYY
       text/plain
         OK OK OK OK
       --YYY
       text/html
         <html>OK OK OK OK</html>
       --YYY--
       <html>COPY, DOESN'T BELONG HERE</html>
     --XXX
     text/x-moz-deleted
       blah blah blah
     --XXX--

Steps to reproduce:
1) integrate attachment 177627 [details] into your mail system
2) View the message; delete and/or detach the Joe.doc att't.
3) View the resulting message's source

Actual results:
3) Bogus MIME structure observed

Expected results:
3) Correct MIME structure

Comment 1

12 years ago
This bug is holding back my mail archiving. I would like to save attachments
without having my mail format butched.

Comment 2

12 years ago
This is a scary one, if it happens to you (it happened to me)

Comment 3

12 years ago
I think this should block SeaMonkey's release because it's a major functionality
that is broken and causing bloat.
Flags: blocking-seamonkey1.0b?
Keywords: regression

Comment 4

12 years ago
If you want this bug fixed in 1.0b, you should nominate it for 1.8b5.  The
relevant code is shared and 1.0b will be released off of 1.8b5, whatever that is.

Comment 5

12 years ago
See my previous comment for the reason.
Flags: blocking-seamonkey1.0b? → blocking1.8b5?

Comment 6

12 years ago
David, I'll let you decide what to do with this bug. 
Flags: blocking1.8b5? → blocking1.8b5-
(Assignee)

Comment 7

12 years ago
I'll try to fix it. Changing this code is risky, however.
(Assignee)

Comment 8

12 years ago
Created attachment 197455 [details] [diff] [review]
proposed fix

don't display cached part when stripping attachments.
Attachment #197455 - Flags: superreview?(mscott)

Updated

12 years ago
Attachment #197455 - Flags: superreview?(mscott) → superreview+
(Reporter)

Comment 9

12 years ago
(In reply to comment #8)
> don't display cached part when stripping attachments.

??  Does that fix really belong to this bug?
(Assignee)

Comment 10

12 years ago
Comment on attachment 197455 [details] [diff] [review]
proposed fix

I'll let this bake on the trunk for a little bit, but if everything is ok, I'd
like to check it into the branch as well.
Attachment #197455 - Flags: approval1.8b5?
(Assignee)

Comment 11

12 years ago
>> ??  Does that fix really belong to this bug?

yes, it does - it was the call to display the cached part (the multipart
alternative that we've cached for display) that was causing us to write out the
extra copy of the body.

Comment 12

12 years ago
Please re-ping me when you feel this has baked enough and I'll approve the fix.

Comment 13

12 years ago
When this bug is worked on, perhaps two more attachment-deletion related errors
can be also fixed?

1. When an attachment is deleted from a message where the sender had requested a
receipt notification ("Return-receipt-to:" header, probably the same with
"Disposion-Notification-to:"), a popup window appears again, asking if the
notification shall be sent. This should not happen.

2. After having deleted an attachment, the junk status of the message is set to
"unknown". The junk status should not change upon attachment deletion.

(Or should a new bug be opened for these?)

Updated

12 years ago
Flags: blocking1.8b5- → blocking1.8b5+
(Reporter)

Comment 14

12 years ago
I've just tried TB 1.6a1+0928, and this patch appears to have fixed the reported 
problem.  Thanks, David!
(Assignee)

Comment 15

12 years ago
great, thx, Mike - pinging mscott for a=, per his request.

Updated

12 years ago
Attachment #197455 - Flags: approval1.8b5? → approval1.8b5+
(Assignee)

Updated

12 years ago
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Keywords: regression → fixed1.8
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.