Open Bug 729742 Opened 12 years ago Updated 2 years ago

remote content doesn't show images (Tb fails to process <img src="http:..."> and Content-Location: if filename in Content-Disposition contains "?" and filename is not quoted by double-quote)

Categories

(MailNews Core :: MIME, defect)

x86_64
Windows 7
defect

Tracking

(Not tracked)

People

(Reporter: john.system, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

133.53 KB, application/octet-stream
Details
Attached file Newsletter.eml
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Build ID: 20120215223356

Steps to reproduce:

My partner is sending newsletters, but I can't see the content.

I confirmed to download the remote content, I added sender to my address book, but I still can't see the images in mails.


Actual results:

No images,


Expected results:

Images should display.
Group: core-security
(In reply to John from comment #0)
The JPG image within linked by the email, I tried to view it in a web browser but nothing gets displayed. Try it:
http://www.it4profit.com/mms/image_server.jsp?IMGID=3D11092909091485047=
8&EXT=3D.jpg
yes, because the "3D" in the link after "=", if you remove both 3D, then link is

http://www.it4profit.com/mms/image_server.jsp?IMGID=110929090914850478&EXT=.jpg

and it works

So the problem is TB can not remove 3D from the link
(In reply to John from comment #2)
> So the problem is TB can not remove 3D from the link

No. It's not problem nor cause. Tb correctly decodes quoted-printable.

Check results with Tb 10.0.1 on Win-XP, using attached mail data.

(Case-A) Disable cid: url resolution by Content-Location: header change. 
> Content-Location: http: -> Content-Location: Xhttp:
Remote images specified as <img src="http://..."> in HTML is shown as expected, when remote image display is allowed.
When the mail is forwarded, file url of image properties is as follows.
> http://www.it4profit.com/mms/image_server.jsp?IMGID=110929090914850478&EXT=.jpg

(Case-B) Change filename= in Content-Disposition: to ordinal one.
>    Content-Disposition: ATTACHMENT; filename=http://www.it4profit.com/mms/image_server.jsp?IMGID=
> -> Content-Disposition: ATTACHMENT; filename="
> &EXT=.jpg -> .jpg"
> &EXT=.gif -> .gif"
Final Content-Disposition: header after change.
  Content-Disposition: ATTACHMENT; filename="110929090914850478.jpg"
Remote images specified as <img src="http://..."> in HTML and Content-Location: header is shown as expected, when remote image display is allowed.
When the mail is forwarded, file url of image properties is as follows.
> http://www.it4profit.com/mms/image_server.jsp?IMGID=110929090914850478&EXT=.jpg

(Case-C) Original mail. filename=http://..., without quote, same as image's URL/Content-Location: header. 
Message for permission of remote images is shown.
Image is broken even after permission of remote image display.
When the mail is forwarded, file url of image properties is as follows.
> mailbox:///C:/wada/@@@/Mail-X/Inbox.sbd/Remote-Image?number=0&part=1.6&filename=http://www.it4profit.com/mms/image_server.jsp?IMGID=110929090914850478&EXT=.jpg

Confirming per original report/test mail and test results.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I see, 

so what can I do as receiver ?

Best regards
B
(In reply to John from comment #4)
> so what can I do as receiver ?

As seen in Case-A, mail is shown as expected if embed images are removed.
As for this mail, "Delete" of embed image parts is a workaround.
(1) mailnews.display.show_all_body_parts_menu = true
    by Config Editor(Tools/Options/Advanced/General)
(2) Copy the mail to a local mail folder
(3) View/Message Body As/All Body Parts
(4) "Delete" images shown at attachmet pane as if attachment.
    Content-Location: http:... header is removed by Delete operation.
    (no need of "Detach" for this mail, because actual remote image is shown) 
(5) View/Message Body As/Original HTML
To avoid accidental Delete/Detach in All Body Parts mode, reset show_all_body_parts_menu in daily use, please.
(Case-D) Quote filename= parameter value
>    Content-Disposition: ATTACHMENT; filename=
> -> Content-Disposition: ATTACHMENT; filename="
> &EXT=.jpg -> &EXT=.jpg"
> &EXT=.gif -> &EXT=.gif"
All images are shown as expected.
Summary: remote content doesn't show images → remote content doesn't show images (Tb fails to process <img src="http:..."> and Content-Location: if filename in Content-Disposition contains special chars and filename is not quoted by double-quote)
Problem was observed in Tb version 1.6a1 (20051020), Tb3.0b2pre final build(2009-01-08), Tb7.0a1 final build(2011-07-05-03) too. 

Because Tb version 1.6a1 had "copy image location" feature, following was observed for broken image in message display(no need of Edit As New, Foorward etc.)
Original mail(Case-C).
> mailbox:///C|/wada/@@@/Mail-X/Inbox.sbd/Remote-Image?number=0&part=1.6&filename=http://www.it4profit.com/mms/image_server.jsp?IMGID=110929090914850478&EXT=.jpg
Modified mails(Case-A/B/D)
> http://www.it4profit.com/mms/image_server.jsp?IMGID=110929090914850478&EXT=.jpg
Component: Message Reader UI → MIME
Product: Thunderbird → MailNews Core
QA Contact: message-reader → mime
(Case-E) Change "?" in filename to "_" (not quoted by double-quote in this case)
>    filename=http://www.it4profit.com/mms/image_server.jsp?
> -> filename=http://www.it4profit.com/mms/image_server.jsp_
Image is shown even when "Show Remote Content" is not requested yet(embed image/jpeg, image/gif data is used).
Image location in Forward mail
> mailbox:///C:/wada/@@@/Mail-X/Inbox.sbd/Remote-Image?number=684291&part=1.6&filename=http://www.it4profit.com/mms/image_server.jsp_IMGID=110929090914850478&EXT=.jpg
This is same even after "Show Remote Content" is requested.
In other cases, "Loading Message" is shown at status bar for while(indicates that HTTP get is issued), but in this case, "Loading Message" is not shown(indicates that image/jpeg, image/gif part in the mail is used.)

There are two problems.

(Problem-1) Inconsistency in Content-Location: header use
- "?" exist in filename
  image/jpeg, image/gif part is not found due to cut at "?" of mailbox:// URL.
  => Further process is not executed, and http:// of <IMG> is used.
- "?" doesn't exist in filename
  image/jpeg, image/gif part pointed by mailbox: URL is found.
  => Content-Location: http://... is used, and embed image data is used.
What is spec on "Content-Location: http://..." use when <img src="http://...">?

(Problem-2) "?" in filename parameter value is not escaped nor modified in URL like image location.
Escape or modification of "&" may be needed too because "&" is used for &part= and &filename= as keyword in URL like image location.
Summary: remote content doesn't show images (Tb fails to process <img src="http:..."> and Content-Location: if filename in Content-Disposition contains special chars and filename is not quoted by double-quote) → remote content doesn't show images (Tb fails to process <img src="http:..."> and Content-Location: if filename in Content-Disposition contains "?" and filename is not quoted by double-quote)
I've opned bug 731120 for Problem-2 due to "?" in filename.

Re-written previous (Problem-1)

(Problem-0) This bug's original problem. 
When "?" is contained in filename and filename is not quoted by double-quote.
Tb fails to process <img src="http://..."> and Content-Location: http://.... So remote image of http://... nor embed image in message is not shown.

(Problem-1) Inconsistency between (Phenomenon-A) and (Phenomenon-B)
(Phenomenon-A)
When "?" is contained in filename but filename is quoted by double-quote.
Due to bug 731120, Tb fails to find image/jpg, image/gif part, then Content-Location: is not applied. So <img src="http://..."> is processed as remote image.  
(Phenomenon-B)
When "?" is not contained in filename.
Bug 731120 doesn't occur, so Tb finds image/jpg, image/gif part, then Content-Location: is applied. So <img src="http://..."> is processed as embed image, even though confirmation for remote image display is shown, even after "Show Remote Content" is requested.
No longer blocks: 731120
Depends on: 731120
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: