Closed Bug 1114008 Opened 9 years ago Closed 8 years ago

Image from URL missing when draft is saved with <img moz-do-not-send="true">, if Image Location contains "query string" of URI

Categories

(Thunderbird :: Untriaged, defect)

31 Branch
x86_64
Windows 8.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1276419

People

(Reporter: u419945, Unassigned)

Details

Attachments

(1 file)

Attached image Immagine senza nome.png
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141125180439

Steps to reproduce:

On IMAP email
1. New email message from Thunderbird.
2. Insert Image from Internet URL
3. Continue to write your email
after some minutes a draft will be saved automatically, now your image loose the URL and are not more correctly showed. URL of internet has been replaced vy IMAP URL who is invalid for image so i loose all image in the email and also the recever will be unable to see the images.


Actual results:

After insert an image from URL and after a Draft is been saved after some while, all image inserted by Internet URL will not show in the email because URL has been changed into IMAP URL who is not good for show image so you see your image of before working in your message be broken and also when you send the email the recever will not see the pictures.


Expected results:

Maybe image URL must remain the same. Only change maybe when an image is loaded from the PC, not from URL.

When Thunderbird save a draft URL of image should not change or image will be broken!
How to reproduce without waiting for auto-save or without auto-save enabled.

1)

Create a message with an external image.
Save this message as Draft, three times in a row.

2)

Open an existing message with an external image with 'Edit As New Message'
Save message as Template
Confirming on TB 45, Linux.

Simple to reproduce.

Menu Insert/Image, from external URL, added an alt text. Using Ctrl-S multiple times or wait for autosave. Image disappears even from the original Edit window.

Very annoying if I may add.
Hi,
I AM the reporter of this BUG. For me on Windows with Thunderbird 45 I AM unable to replicate this issue.

Are you posting an image URL of Facebook?
I ask this because seems some pictures on Facebook when you take the direct link will expire after a while so in that case Thunderbird had nothing to do with this issue.

I toyed to add casual image from Google but I was unable to reproduce. The alt text is the alternative text I think, I inserted it, pressed ctrl + a draft saved but no issue on gmail account.
Thanks Marco.
I use an image URL to our corporate signature image on our public server, no expiration.

But I figured it out.

When there is cache-protecting querystring in the image URL, "?v=4" in my case, the image gets replaced by the imap://myuser@myserver:143/fetch%3EUID%3E.Drafts%3E32854?v=4
That is making it immediatelly useless.

Without the "?v=4", the TB 45 works just fine.
Can you confirm?
"That is making it immediatelly useless." -> "The image disappears right after a Draft (auto)save, possibly not after the first one."
I AM unable to change status of this topic so maybe we need someone with the right can do this for us.
If you can paste here an image URL that cause the issue will be more easy to test for me and also members of the community.
(In reply to Marco from comment #3)
> Hi,
> I AM the reporter of this BUG. For me on Windows with Thunderbird 45 I AM
> unable to replicate this issue.
> 
> Are you posting an image URL of Facebook?
> I ask this because seems some pictures on Facebook when you take the direct
> link will expire after a while so in that case Thunderbird had nothing to do
> with this issue.
> 
> I toyed to add casual image from Google but I was unable to reproduce. The
> alt text is the alternative text I think, I inserted it, pressed ctrl + a
> draft saved but no issue on gmail account.

I can still reliably reproduce this on 45.1.1
To all problem reportes:
Are you talking about following phenomenon?

(1) Compose an HTML mail(Subject=xxx-001), insert image(s) in the HTML mail.
 "[ ] Attach the image to the message" option is unchecked.
 Following image URL is used for ease of test.
 (A) HTTPS-Image (Photo of MARCO in this bug who is the bug opener)
 https://secure.gravatar.com/avatar/879385da7489a39b50513dde5c68ee5a?d=mm&amp;amp;size=64
 (B) HTTP-Image (A small LOGO mark in Japan)
  http://www.visitjapan.jp/images/common/logo_jed-en.png

(2) Save as Draft(Subject=xxx-001)
Message Source of the saved draft.
> (A) HTTPS-Image
>  <img alt="qqq" title="ppp"
>  src="https://secure.gravatar.com/avatar/879385da7489a39b50513dde5c68ee5a?d=mm&amp;amp;size=64"
>  moz-do-not-send="true" width="80" height="80">
> (B) HTTP-Image
>  <img alt="yyy" title="xxx"
>   src="http://www.visitjapan.jp/images/common/logo_jed-en.png"
>   moz-do-not-send="true" width="107" height="44">
Format/Image Properties/Image Location of the image in composing HTML mail.
> (A) HTTPS-Image : https://... is kep 
> (B) HTTP-Image  : http://... is kept

(3) Change subject(Subject=xxx-002), save as Draft
Message Source of the saved draft(still proper).
> (A) HTTPS-Image
>  <img alt="qqq" title="ppp"
>  src="https://secure.gravatar.com/avatar/879385da7489a39b50513dde5c68ee5a?d=mm&amp;amp;size=64"
>  moz-do-not-send="true" width="80" height="80">
> (B) HTTP-Image
>  <img alt="yyy" title="xxx"
>   src="http://www.visitjapan.jp/images/common/logo_jed-en.png"
>   moz-do-not-send="true" width="107" height="44">
Format/Image Properties/Image Location of the image in composing HTML mail.
When HTTPS image, Image Location is altered to mailbox: URL even though moz-do-not-send="true" is used.
> (A) HTTPS-Image : mailbox:///C:/Users/ ... /Mail/Local%20Folders/Drafts?number=2&d=mm&amp;size=64 
> (B) HTTP-Image  : http://... is still kept

(4) Change subject(Subject=xxx-003), save as Draft
When HTTPS image, Message Source of the saved draft is broken.
> (A) HTTPS-Image
>  <img alt="qqq" title="ppp"
> src="mailbox:///C:/Users/ ... /Mail/Local%20Folders/Drafts?number=2&d=mm&amp;size=64"
>  moz-do-not-send="true" width="80" height="80">
> (B) HTTP-Image
>  <img alt="yyy" title="xxx"
>   src="http://www.visitjapan.jp/images/common/logo_jed-en.png"
>   moz-do-not-send="true" width="107" height="44">
Format/Image Properties/Image Location of the image in composing HTML mail.
When HTTPS image, Image Location is already broken upon previous save.
> (A) HTTPS-Image : mailbox:///C:/Users/ ... /Mail/Local%20Folders/Drafts?number=2&d=mm&amp;size=64 
> (B) HTTP-Image  : http://... is still kept
Note:
If Drafts folder of IMAP is used for draft save, imap: URL is used instead of mailbox: URL.
"IMAP" in bug summary is misleading, becuase IMAP specific issue.
(In reply to Vlada Macek from comment #4)
> Without the "?v=4", the TB 45 works just fine.

If following URL is used for MARCO's photo in HTML mail, 
  https://secure.gravatar.com/avatar/879385da7489a39b50513dde5c68ee5a
problem is not observed.
I also think hash/search relevant issue in image URL.
Sorry, wrong statement.
 becuase IMAP specific issue => because this bug is NOT IMAP specific issue
MARCO's photo case was slightly confusing because "&" is involved in URL, and I was confused.
(A) URL for his Photo.
 Format/Image Properties/Image Location is specified in this format of URL.
 (1) https://secure.gravatar.com/avatar/879385da7489a39b50513dde5c68ee5a
 (2) https://secure.gravatar.com/avatar/879385da7489a39b50513dde5c68ee5a?d=mm&size=64
(B) (2) is represented with "& replaced by &amp;" in HTML source.
 (2-a) Link : <a href="https:// ... ?d=mm&amp;size=64">LinkText</a>
 (2-b) IMG with moz-do-not-send="true" : <img src="https:// ... ?d=mm&amp;size=64">

Can someone provide simple URL sample for duplication test?
FYI.
Phenomenon of comment #8 was observed with file: URL and search field in the URL.
Because nothing is executed for "?xyz=pqr part in the URL", this local image file is normally read.
- Image Location(URL) = file:///C:/PICTURE/abcdefg.jpg?xyz=pqr
After Save As Draft, Image Location is changed to;
- mailbox:///C:/Users/ ... /Mail/Local%20Folders/Drafts?number=1&xyz=pqr
After next Save As Draft, message source of saved draft is;
- <img src="mailbox:///C:/Users/ ... /Mail/Local%20Folders/Drafts?number=2&amp;xyz=pqr">
Essentially, same issue as Bug 1276419.
Depends on: 1276419
Hi, I'm trying to clarify my report from the user point of view.
Thunderbird 45.2.0 as distributed by Ubuntu 14.04.4 LTS.

Conclusion: The bug is triggered only by '?' in the URL. The image origin and "Attach this image to the message" setting do not matter.

Here's what I did:

* open new message
* add 8 inline images with alt. text "xx":
** http://nadacnik.cz/img/nadacnik_logo_email.png, [ ] Attach ... to message
** http://nadacnik.cz/img/nadacnik_logo_email.png?v=4, [ ] Attach ... to message
** http://nadacnik.cz/img/nadacnik_logo_email.png, [x] Attach ... to message
** http://nadacnik.cz/img/nadacnik_logo_email.png?v=4, [x] Attach ... to message
** /tmp/nadacnik_logo_email.png, [ ] Attach ... to message
** /tmp/nadacnik_logo_email.png?v=4, [ ] Attach ... to message
** /tmp/nadacnik_logo_email.png, [x] Attach ... to message
** /tmp/nadacnik_logo_email.png?v=4, [x] Attach ... to message
* Hit Ctrl-S twice or three times.

* every second image gets replaced by a broken image placeholder
* the resulting URL of broken image is the same in all four cases:

imap://###/fetch%3EUID%3E.Drafts%3E32924?v=4

(### is my IMAP server user+host.)

Note: In /tmp/ I have two copies of the file with and without the "query string".
(In reply to Vlada Macek from comment #15)
> ** http://nadacnik.cz/img/nadacnik_logo_email.png
> ** http://nadacnik.cz/img/nadacnik_logo_email.png?v=4

Thanks for actual image URL with "?abc=def" pattern only.
No redirect of URL(200 OK and image/png data is returned directly), so redirect relevant problem is not involved.
If both cases are involved in a test, it's confusing for both tester and developers.
Do one case only in a test mail composing, please.

> ... , [x] Attach ... to message
> ... , [ ] Attach ... to

If both cases are involved in a test, it's confusing for both tester and developers.
Do one case only in a test mail composing, please.

> ** /tmp/nadacnik_logo_email.png
> ** /tmp/nadacnik_logo_email.png?v=4
> Note: In /tmp/ I have two copies of the file with and without the "query string".

Thanks for providing actual local file name case on Linux.
On Win, "?" is not permitted in file name string at Windows Explorer, so image URL with "?v=4" is faked URL.
Thus, "file:///C: ... .png?v=4" case on Win is surely rejected as INVALID bug by developer :-)

As you observed and described, and as stated in bug 1276419, key factor is the "query string" in image URL.

> * every second image gets replaced by a broken image placeholder
> * the resulting URL of broken image is the same in all four cases:
> imap://###/fetch%3EUID%3E.Drafts%3E32924?v=4

Before and after each Save As Draft, please check Format/Image Properties/Image Location of image in HTML mail.
After each Save As Draft, check message source of saved draft mail.
IMAP Drafts or local Drafts is irrelevant to problem.
If IMAP Drafts, imap:// ... fetch%3EUID%3E.Drafts%3Ennnnn is used,
and if local Drafts, mailbox:// ... Drafts?number=nnnnn is used,
 for pointing previous version of draft mail where "nnnnn" is messageKey(Order Received column value).

Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Image from URL missing when draft is saved (IMAP) → Image from URL missing when draft is saved with <img moz-do-not-send="true">, if Image Location contains "query string" of URI
This will be fixed by bug 1276419.
Status: NEW → RESOLVED
Closed: 8 years ago
No longer depends on: 1276419
Resolution: --- → DUPLICATE
Since the fix in bug 1276419 got uplifted, this is fixed in TB 45.3. Enjoy!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: