Closed Bug 493157 Opened 17 years ago Closed 16 years ago

IMAP attachment text file data is incorrect received from OEX composed email

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: philbaseless-firefox, Assigned: philbaseless-firefox)

Details

Attachments

(2 files)

Using gmail account, connected via IMAP. An email with text file attached, when opened or saved reads incorrect data. Interpreting OEX data as HTML tags. See attachment. Speaks for itself Actual file content test file Content of attachment from received email: <div class="moz-text-flowed" style="font-family: -moz-fixed">test file</div>
Summary: IMAP attachment text file data is incorrect received from OEX → IMAP attachment text file data is incorrect received from OEX composed email
It is interesting that the wrapped lines of the content types etc have a tab at the start of the line rather than a space. I wonder if there's something in the rfc that we are expecting and OEX is doing wrong, or if we're not flexible enough.
Don't know if that would explain that we see and expect plain/text yet we render it like for a browser. I'll do some debugging
Comment on attachment 377608 [details] source comparison of emails >Content-Type: text/plain; > format=flowed; > name="New & Text Document.txt"; > reply-type=original >Content-Transfer-Encoding: 7bit >Content-Disposition: attachment; > filename="New & Text Document.txt" > >test file >------=_NextPart_000_001C_01C9D4DE.52ABF880-- in mailbox file, changing tabs to spaces had no effect. However removing format=flowed fixed it. Mark, what now? Shouldn't that qualifier be ignored and not override text/plain?
never could find where the attachment is marked as nsMimeMessageRaw. I'm not sure what nsMimeMessageAttach means, maybe a designation that it is an attachment in which case I need to know where this is getting tagged so maybe it should be tagged as such. Either way I would think this check is proper and any naMimeMessageRaw should not be parsed into anything.
Attachment #377992 - Flags: review?(bugzilla)
Flags: blocking-thunderbird3?
QA Contact: networking.imap → philbaseless-firefox
Assignee: nobody → philbaseless-firefox
QA Contact: philbaseless-firefox → networking.imap
Attachment #377992 - Flags: superreview?(bienvenu)
Attachment #377992 - Flags: review?(bugzilla)
Attachment #377992 - Flags: review?(bienvenu)
Comment on attachment 377992 [details] [diff] [review] passes thru as is data marked as raw [Checkin: Comment 10] David knows this area of the code much better than I do, so passing to him.
from nsStreamConverter.cpp, if it has a 'part' it defaults to raw. If not and it has a 'header=' it may have the attach type which is nsMimeMessageAttach which uses the plaintext mimeobjecttype. So the only question is if we ever need nsMimeMessageRaw format type to be output with the plaintextflowed mimeobjecttype which essentially puts in the html code for displaying purposes. If so then maybe we should be calling an attachment nsMimeMessageAttach and forget this patch.
Status: NEW → ASSIGNED
This patch does not affect decoding binary attachments. my proof consists of opening a zip file from imap message with zip attachment residing in draft folder. Also, this works in local folders.
Comment on attachment 377992 [details] [diff] [review] passes thru as is data marked as raw [Checkin: Comment 10] thx for the patch, it definitely fixes the problem, and I can't see why we'd ever want raw to mean output html. I would think we'd want the format_out to be nsMimeMessageAttach so I'll have a look at the code that's setting the type to raw to see what's going on there - it might have to do with stripping attachments...
Attachment #377992 - Flags: superreview?(bienvenu)
Attachment #377992 - Flags: superreview+
Attachment #377992 - Flags: review?(bienvenu)
Attachment #377992 - Flags: review+
I used an email with html formatting and viewed attachment in-line and it displayed ok with this patch so I marked checkin required.
Keywords: checkin-needed
Attachment #377992 - Attachment description: passes thru as is data marked as raw → passes thru as is data marked as raw [Checkin: Comment 10]
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: blocking-thunderbird3?
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: