Closed Bug 529735 Opened 15 years ago Closed 9 years ago

double clicking on a .eml message doesn't show remote images

Categories

(Thunderbird :: Message Reader UI, defect)

defect
Not set
normal

Tracking

(thunderbird45 fixed, thunderbird46 fixed, thunderbird47 fixed, thunderbird_esr38 wontfix)

RESOLVED FIXED
Thunderbird 47.0
Tracking Status
thunderbird45 --- fixed
thunderbird46 --- fixed
thunderbird47 --- fixed
thunderbird_esr38 --- wontfix

People

(Reporter: emoore, Assigned: mkmelin)

References

()

Details

(Whiteboard: [gs])

Attachments

(3 files, 5 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091117 Thunderbird/3.0 I'm using build 2 of Thunderbird 3.0RC1 under Vista. I saved a HTML message with remote images as a .eml file. The sender is listed in the address book, "allow remote content" is checked, and I can see the remote images. I exited Thunderbird and double clicked on the .eml file in windows explorer. It brought up a standalone window that displays the message contents. It didn't display any remote images. The placeholders for the missing images are different than what I'm used to but are consistent with other messages where remote content is disabled. Clicking on "To view this email as a web page, go here." worked fine (displayed the remote images etc.) though the web page still contained "To view this email as a web page, go here.". I get the same results if I use File -> Open Saved Message instead. Reproducible: Always
Blocks: qa-tb3.0rc1
Confirmed Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091118 Lightning/1.0pre Shredder/3.0.1pre ID:20091118034000
Status: UNCONFIRMED → NEW
Ever confirmed: true
testcase pretty please ?
Attached file testcase
here you are! ;-)
Keywords: testcase
I see the problem, but this does not appear to be a regression. The same symptoms appear using: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1pre) Gecko/20080915030813 Shredder/3.0b1pre ID:20080915030813 EML files as a way to archive HTML messages have always been problematic (useless) to me. I can't find a dup at the moment.
This feels like the content policy not getting the right message header or the right details to work out about the remote image issue. However, I thought standalone eml files got their own dummy message header. Need to do a bit of debug, but maybe David has an idea as well.
Looks like we are not doing the remote content check at all. Setting mailnews.message_display.disable_remote_image to false loads most of the remote images in the testcase (One still hangs possibly it's no longer availabe)
Assignee: nobody → mkmelin+mozilla
Assignee: mkmelin+mozilla → nobody
There is also bug 541862 reflecting comment #6. If you want to concentrate on the address book issue here and handle the general remote-content notification in that other bug it should be confirmed, otherwise duped to this bug.
I tried taking a look at this today. nsMsgContentPolicy::ShouldAcceptContentForPotentialMsg isn't taking account of the standalone message window and loading eml files. The obvious thing would be to use the code in nsIMessenger to get a dummy message header: http://hg.mozilla.org/comm-central/annotate/25e697e42d9a/mailnews/base/src/nsMessenger.cpp#l1473 However, in the content policy we don't have a way of getting the msgWindow that this needs to work (or at least need to get the msgHeaderSink from that). David, any thoughts?
Flags: wanted-thunderbird+
(In reply to comment #10) > > However, in the content policy we don't have a way of getting the msgWindow > that this needs to work (or at least need to get the msgHeaderSink from that). > > David, any thoughts? yeah, I think I can fix this. I'll try to write a patch now.
Attached patch proposed fix (obsolete) — Splinter Review
This should fix it - there are two main issues; one is getting to the dummy msg header in the content policy code, and the other is fixing reload in the stand-alone message window, which was completely broken, so this fix should help with a bunch of issues. Next up is writing a mozmill test, which will take me some time...
Assignee: nobody → bienvenu
Any progress on this bug? It's still there in TB 12.0.1. I can offer the following extra clues: 1. The missing images are visible in the TB Print Preview, so that works even if the normal email viewer doesn't. 2. If I change the '.eml' extension to '.mht', I can open the file in IE or Firefox (with the UnMHT plugin) and the images display fine, so the EML file itself appears to be intact. 3. If I drag and drop the EML file into my TB inbox, I get a 'Show Remote Content' button in the message header area. Clicking the button shows me the images. 4. Double-clicking the same EML file in Windows Explorer opens it in a separate TB window that does not have the 'Show Remote Content' button. Therefore I can't see the images. And yes, I have 'View > Message Body As' set to 'Original HTML', and 'View > Display Attachments Inline' checked, and the sender is in my address book.
hmm, looks like this patch was forgotten about. I'll see if it still makes sense.
Attached patch de-bitrotted patch (obsolete) — Splinter Review
this patch still works. I'll try to figure out how to make the mozmill content policy tests test .eml files
Attachment #479571 - Attachment is obsolete: true
Attached patch with mozmill test (obsolete) — Splinter Review
Attachment #629859 - Attachment is obsolete: true
Attachment #630000 - Flags: review?(neil)
Comment on attachment 630000 [details] [diff] [review] with mozmill test >- nsCOMPtr<nsIMsgDBHdr> msgHdr; >- rv = GetMsgDBHdrFromURI(resourceURI.get(), getter_AddRefs(msgHdr)); >+ nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl(do_QueryInterface(aOriginatorLocation, &rv)); > NS_ENSURE_SUCCESS(rv, ); > >- nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl(do_QueryInterface(aOriginatorLocation, &rv)); >- NS_ENSURE_SUCCESS(rv, ); >+ nsCOMPtr<nsIMsgDBHdr> msgHdr; >+ nsCOMPtr<nsIMsgWindow> msgWindow; >+ rv = GetMsgDBHdrFromURI(resourceURI.get(), getter_AddRefs(msgHdr)); Are you just out to confuse diff by reordering your lines? ;-) >+ if (NS_FAILED(rv)) >+ { >+ rv = mailnewsUrl->GetMsgWindow(getter_AddRefs(msgWindow)); ... > // content header bar, so the user can override if they wish. > if (*aDecision == nsIContentPolicy::REJECT_REQUEST) > { >- nsCOMPtr<nsIMsgWindow> msgWindow; > (void)mailnewsUrl->GetMsgWindow(getter_AddRefs(msgWindow)); I guess it doesn't hurt to fetch the msgWindow twice, but in that case, I'd prefer it if they were separately scoped.
(In reply to neil@parkwaycc.co.uk from comment #17) > Are you just out to confuse diff by reordering your lines? ;-) My patch had bit-rotted, so I had to apply it by hand...I think I thought grouping the var decls read better... > > >+ if (NS_FAILED(rv)) > >+ { > >+ rv = mailnewsUrl->GetMsgWindow(getter_AddRefs(msgWindow)); > ... > > // content header bar, so the user can override if they wish. > > if (*aDecision == nsIContentPolicy::REJECT_REQUEST) > > { > >- nsCOMPtr<nsIMsgWindow> msgWindow; > > (void)mailnewsUrl->GetMsgWindow(getter_AddRefs(msgWindow)); > I guess it doesn't hurt to fetch the msgWindow twice, but in that case, I'd > prefer it if they were separately scoped. I can do that...
Attachment #630000 - Attachment is obsolete: true
Attachment #630000 - Flags: review?(neil)
Attachment #631007 - Flags: review?(neil)
OK, so with the patch I see the remote content bar, although it doesn't actually work; should it?
(In reply to neil@parkwaycc.co.uk from comment #20) > OK, so with the patch I see the remote content bar, although it doesn't > actually work; should it? Hmm, I thought it worked for me...
(In reply to neil@parkwaycc.co.uk from comment #20) > OK, so with the patch I see the remote content bar, although it doesn't > actually work; should it? Yeah, tried it again with the message I've been using to test this - it worked for me in TB.
this is the test message I've been using - https://bugzilla.mozilla.org/attachment.cgi?id=413714
Whiteboard: [gs]
Any progress on this bug? I can confirm the same behaviour on TB 17 Mac OSX.
OS: Windows Vista → All
Hardware: x86 → All
Whiteboard: [gs] → [patchlove][has draft patch][gs]
Attached patch proposed fix (obsolete) — Splinter Review
Unbitrotted the patch, and modified the test a bit. I can confirm it works, and the show remote content button does show remote images at least in thunderbird. I wasn't able to get my seamonkey mail build to work at all so can't say if there's still a problem with the button. Either way, surely this would be a prelude to fixing that problem.
Assignee: mozilla → mkmelin+mozilla
Attachment #631007 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #631007 - Flags: review?(neil)
Attachment #726136 - Flags: review?(neil)
Whiteboard: [patchlove][has draft patch][gs] → [gs]
this bug is still there (or is there again) in 17.0.7. works if the email is: replied forwarded viewed in browser as html or print previewed, but not when launched as .eml file. no 'show remote content' button is available to force it.
note that if you set: mailnews.message_display.disable_remote_image to FALSE, then it DOES display the images in the .eml. however i think using that workaround displays all images in all emails, so this should still be considered a big imho.
So the reason it doesn't work in suite - even with the patch should be this: LoadMsgWithRemoteContent() -> msgHdrForCurrentMessage(), which is null. In tb gMessageDisplay.displayedMessage is used but that doesn't work in suite - http://mxr.mozilla.org/comm-central/source/suite/mailnews/folderDisplay.js#101 That and bug 911454. neil: review ping
Problem (no alert about remote content is shown when opening an .eml file) exists in 24.4.0.
Refreshed, maybe we can get this old patch finally in.
Attachment #726136 - Attachment is obsolete: true
Attachment #726136 - Flags: review?(neil)
Attachment #8687716 - Flags: review?(Pidgeot18)
Joshua: review ping
Comment on attachment 8687716 [details] [diff] [review] bug529735_eml_remote_images.patch 3 years is probably long enough to be waiting for a review (including the Neil time) Let's take this, looks good to me, LGTM and has been vetted pretty well previously.
Attachment #8687716 - Flags: review?(Pidgeot18) → review+
Comment on attachment 8687716 [details] [diff] [review] bug529735_eml_remote_images.patch https://hg.mozilla.org/comm-central/rev/6947cca9f5f1 No reason we can't push this forward to TB 45 after a little bake.
Attachment #8687716 - Flags: approval-comm-beta?
Attachment #8687716 - Flags: approval-comm-aurora?
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: qawanted, testcase
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 47.0
Attachment #8687716 - Flags: approval-comm-aurora? → approval-comm-aurora+
Attachment #8687716 - Flags: approval-comm-beta? → approval-comm-beta+
Attachment #8687716 - Flags: approval-comm-beta+ → approval-comm-esr45+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: