Closed Bug 578104 Opened 10 years ago Closed 9 years ago

Conversion of data: URI as image source provides mangled attachment name, may not allow saving images pasted or drag-and-dropped

Categories

(MailNews Core :: Composition, defect, major)

defect
Not set
major

Tracking

(blocking-thunderbird5.0 beta2+, thunderbird5.0 beta2-fixed, thunderbird6 fixed)

RESOLVED FIXED
Thunderbird 7.0
Tracking Status
blocking-thunderbird5.0 --- beta2+
thunderbird5.0 --- beta2-fixed
thunderbird6 --- fixed

People

(Reporter: rsx11m.pub, Assigned: Bienvenu)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Editor bug 490879 has removed the temporary file when pasting image data from the clipboard, resulting in a "data:image/png;base64,..." URI instead of a file reference. Per bug 490879 comment #32, this appears to be already correctly translated to an <img src="cid:..."> tag in the composed HTML for the message.

However, the created file name for this data-URI is a base64-encoded string without any file extension, and without any useful meaning. Thus, to ensure proper handling by e-mail clients relying on file extensions to determine the file type rather than the Content-Type header, a generic file name with proper extension should be assigned. The current appearance of the attachment is:

    Content-Type: image/png;
     name="sUv...CYII="
    Content-Transfer-Encoding: base64
    Content-ID: <part1. ...@...>
    Content-Disposition: inline;
     filename="sUv...CYII="

where "..." replaces strings of arbitrary lengths.
Depends on: 490879
So in the first Thunderbird release shipping off of Gecko 2.0, this will effectively be a regression, correct?

This is presumably likely to be a problem for all Windows users, since the OS doesn't do metadata-based typing of files, right?
Yes, marking as regression from 1.9.2-branch behavior. It's a problem for any
OS which relies on file extensions to determine file type and opening actions.
Keywords: regression
Flags: blocking-thunderbird-next+
blocking-thunderbird5.0: --- → needed
Flags: blocking-thunderbird-next+
Depends on: 609632
Since the same mechanism has been used in bug 609632 for images inserted by drag-and-drop as well, the problem shows up for those images now too (thus, only Insert > Image provides a meaningful file name as intended, or if the image is attached as a regular attachment outside of the message body).

The problem for the drag-and-drop case is that the editor apparently does no longer provide a filename at all, thus either a similar mechanism as to be found for copy-and-paste to "make up" a filename needs to be used, or an editor patch provided to include the filename into the <img> node.

I've set the "relnote" keyword for upcoming TB 3.3a1 and SM 2.1b2 releases.
Keywords: relnote
So at this point it's pretty hard to save an image that has been dragged in the body of an html email. If you attempt Right click>>save image as you get a dialog with "inbox" as the file name. You can furnish a name and the correct file type manually and the file will save correctly.
For all intents and purposes, saving inline images that have been dragged there is badly broken.
> (comment #3) editor patch provided to include the filename into the <img> node.

Ehsan, would adding some "moz-filename" attribute (or another mechanism to possibly add the file name directly to the src="data:..." URI) be subject to Firefox's upcoming feature freeze, i.e., are there any time constraints?
Not sure if this is a recent regression or not, but inline images that have been copy/pasted into the body are also not assessable with right-click>>save image as.
This is important functionality that is lost in recent builds.

Bumping severity to major.
Severity: normal → major
Attached file mbox format test
Insert image vs pasted image
Summary: Clean up conversion of data: to cid: URIs as image source → Clean up conversion of data: to cid: URIs as image source [inline images inserted with paste or D&D can not be saved]
Joe, with your test case, I get a Save-As dialog on all platforms (Windows XP, Windows 7, and Linux), but only Windows XP won't allow me to save your second image. I can save in the others, though the file isn't recognized as GIF image due to the lack of a proper file extension.

In general, these are two different issues, one triggering the other. The main part of this bug needs to solve the "filename" attribute being an arbitrary(?) base64-encoded string, somewhere assigned in the mailnews backend code. Given that such a filename value causes problems already in Thunderbird itself and apparently on all platforms, even if you do manage to save it, sure justifies the "major" severity. The other problem is the Thunderbird Message Reader UI not allowing to save such an inlined message/related attachment under certain conditions. I'd suggest to spin this off to a separate bug, as it's a backend vs. frontend issue, and have made the summary of this bug a bit more specific.
Summary: Clean up conversion of data: to cid: URIs as image source [inline images inserted with paste or D&D can not be saved] → Conversion of data: URI as image source provides mangled attachment name, may not allow saving images pasted or drag-and-dropped
(In reply to comment #5)
> > (comment #3) editor patch provided to include the filename into the <img> node.
> 
> Ehsan, would adding some "moz-filename" attribute (or another mechanism to
> possibly add the file name directly to the src="data:..." URI) be subject to
> Firefox's upcoming feature freeze, i.e., are there any time constraints?

This is something that we are not going to do in the core editor code, since one of the reasons why we switched to using data: URIs in the first place was to make sure that information about local filesystem is not passed to web pages.

Here is something that I don't understand yet.  Why does mailnews need to have the original file name?  Why can't it just use an arbitrary name, such as Image.png (with the correct file extension, of course).  And is this only an issue when saving the image, or when attaching it to an email as well?
It would be mainly a matter of consistency:
 - If you use Insert > Image, the file name is used for the attachment name;
 - if you use drag-and-drop, the same image doesn't get the file name;
 - also, if you drag-and-drop from a web site, the URL leaf is the name.

Personally, I'm fine with a generic name similar to screen shots if there isn't an easy way to "hide" the source file name in an data: URI; the main issue is indeed the lack of a proper file extension and possibly some special characters in the file name causing the saving process and/or opening the file to fail.

I'm adding Bryan as CC for the file-name issue, as it's mainly a UX impact.
blocking-thunderbird5.0: needed → beta2+
(In reply to comment #9)
> as Image.png (with the correct file extension, of course).  And is this only
> an issue when saving the image, or when attaching it to an email as well?

Correct, this should only matter for inserted images, not "true" attachments.
 
Given that we won't have a leaf name for 5.0, but need "something" to make other e-mail clients happy which expect a well-typed attachment name, going with a fixed prefix (maybe "moz-image.png" in analogy to "moz-screenshot.png" used before bug 490879 removed that) and the MIME-registered file extension is probably the way to go. Thanks for putting this on the 5.0b2 blocking list.
Assignee: nobody → dbienvenu
Attached patch proposed fix (obsolete) — Splinter Review
this fixes it for me - if we get a data uri w/o a file name, then we create a random 8 char name with the chars from 'a' to 'j', and look up the file extension in the mime registry.

I haven't tested that we handle data uri's with filenames in them - I haven't figured out how to get one of those in the compose window yet.
Attached patch proposed fixSplinter Review
I tested by hand that the data uri with a filename parameter does get parsed correctly. As far as the image is concerned, dragging an image file from the file system into the compose window exercises the code and works, though I don't believe that can be easily tested with mozmill all the way through.
Attachment #537920 - Attachment is obsolete: true
Attachment #537949 - Flags: review?(mbanner)
Whiteboard: [has patch for review]
To test a data uri, enter one in Firefox, e.g.

data:image/png;filename=attachment.png;base64,iVBORw0KGgoAAAANSUhEUgAAAXQAAAAmCAIAAABbMPdMAAALKmlDQ1BJQ0MgUHJvZmlsZQAAeAHVl2dYU0kXx+fe9JDQAqFICb1jAOnSa0CkVxshCZ0QU1CwK6KCa0FFBNQFXKUou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Dw593YFhO5WLZh+GQ0YDRS6BoAUgMWTqC9xpkKXbgQaDRgN/GM1AKQALJ68FnmnB5n+sUNoOm40UAQ1wJs7GRkZAEuuW8S725wtFc33Aoug7kyTjAaMBvLSAOFeXjjmw2aA5caLd3z1xNeufNHE5xgEd018Ny/dmXSjAaMBWw0QZOHCG8INwliRL9f+/x9J+AKFr8jIgzBWjK36TIrRgNFAXhqQoyHiLHhD2CzC9j/UTcBU4GNzGwAAAABJRU5ErkJggg==

then drag the image (not the url) from Firefox to the compose window.

I did this and it worked fine.
Comment on attachment 537949 [details] [diff] [review]
proposed fix

>+        // no filename; need to construct one based on the content type.
>+        nsCOMPtr<nsIMIMEService> mimeService (do_GetService(NS_MIMESERVICE_CONTRACTID));

nit: It shouldn't ever happen, but we should null check this. Please also drop the space before the (

r=me with that fixed, please land on comm-central and comm-miramar.
Attachment #537949 - Flags: review?(mbanner)
Attachment #537949 - Flags: review+
Attachment #537949 - Flags: approval-thunderbird5.0+
Attachment #537949 - Flags: approval-comm-aurora?
fixed on trunk http://hg.mozilla.org/comm-central/rev/c0d4c89007cf and for miramar - http://hg.mozilla.org/releases/comm-miramar/rev/c10b34cff335

Presumably, this should land on comm-aurora as well?
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [has patch for review]
Keywords: relnote
Target Milestone: --- → Thunderbird 7.0
Attachment #537949 - Flags: approval-comm-aurora? → approval-comm-aurora+
Depends on: 761051
You need to log in before you can comment on or make changes to this bug.