Closed Bug 587475 Opened 15 years ago Closed 15 years ago

Reimplement UTF-7 in mailnews

Categories

(MailNews Core :: Internationalization, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.3a2

People

(Reporter: smontagu, Assigned: smontagu)

References

Details

Attachments

(1 file, 2 obsolete files)

Bug 414064 will remove UTF-7 from intl/uconv. We need to reimplement UTF-7 and x-imap4-modified-utf7 in mailnews.
(In reply to comment #1) > Created attachment 466142 [details] [diff] [review] > Patch > > This builds locally for me and passes xpcshell-tests, but for some reason it is > failing on all tryserver builds: According to the try graph [1], you pushed from an older version of comm-central which is busted with respect to current mozilla-central. If you update to latest comm-central and push again, then it should work fine. [1] http://hg.mozilla.org/try-comm-central/graph
Attached patch Corrected patch (obsolete) — Splinter Review
Fixed a bug in message display.
Attachment #466599 - Flags: review?(bugzilla)
Attachment #466142 - Flags: feedback?(bugzilla)
(In reply to comment #2) > According to the try graph [1], you pushed from an older version of > comm-central which is busted with respect to current mozilla-central. > > If you update to latest comm-central and push again, then it should work fine. Thanks, Mark, that worked like a dream.
Unfortunately View Source of a UTF-7 message is broken with this approach. I haven't tested viewing an .eml file in browser, but I expect it will be broken also.
We can do this a lot more simply by adopting the mechanism from bug 601429 for marking the charset as "XSSVulnerable", rather than removing the UTF-7 decoder altogether from code code, but we need to make a decision first about what level of utf-7 support we want to retain in mailnews. If we only want to support IMAP Mod utf-7, life will be very simple, and we will need only a one-line patch in mailnews. Supporting messages encoded in utf-7 is harder. I have been working on it, and I have solutions of various degrees of hackery for most of the issues, but I'm not sure if it's worth the investment.
OK, 3 one-line patches ;-) This passes all the IMAP xpcshell tests with attachment 491486 [details] [diff] [review] from bug 414064 applied.
Attachment #466142 - Attachment is obsolete: true
Attachment #466599 - Attachment is obsolete: true
Attachment #491532 - Flags: review?(bugzilla)
Attachment #466599 - Flags: review?(bugzilla)
Comment on attachment 491532 [details] [diff] [review] Use GetDecoderInternal for IMAP This looks good. Sorry for the review delay. r=Standard8
Attachment #491532 - Flags: review?(bugzilla) → review+
Thanks for review, Mark. What is your opinion about whether we need to support UTF-7 encoded messages?
I don't think we have enough information to make a call either way at the moment. I'm also not sure how we'd get that information.
Attachment #491532 - Flags: superreview?(neil)
Comment on attachment 491532 [details] [diff] [review] Use GetDecoderInternal for IMAP There's no sr needed on the patch as you're not changing apis... https://developer.mozilla.org/en/Mailnews_and_Mail_code_review_requirements (unless you really want to).
Attachment #491532 - Flags: superreview?(neil)
Plus most of the patch is test fixes ;-)
Keywords: checkin-needed
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.3a2
Depends on: 677111
Simon, I think we're interested in supporting utf-7 encoded messages - see bug 677111 - what do you think this is going to entail?
(In reply to Simon Montagu from comment #6) > Supporting messages encoded in utf-7 is harder. I have been working on it, > and I have solutions of various degrees of hackery for most of the issues, > but I'm not sure if it's worth the investment. Simon, any more info about this? From bug 677111, it seems that we do want to support utf-7 encoded messages.
Hmm, I'll dig out my old patches and remind myself what I was talking about in that comment.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: