Save image as... stores `image/webp` as `jpeg` file, breaking opening in other applications
Categories
(Firefox :: File Handling, defect, P3)
Tracking
()
People
(Reporter: vlucaci, Assigned: Gijs)
References
Details
(Keywords: regressionwindow-wanted)
Attachments
(2 files)
Affected versions
- 82.0b4(20200926073307)
- 83.0a1(20200928094830)
Affected platforms
- macOS 10.15
Steps to reproduce
- Launch FF.
- Go to https://www.reddit.com/r/pics/ .
- Right click on any image to bring out context menu.
- Click Save image as...
- Open the stored image.
Expected result
- The image should be opened without any issues.
Actual result
- Error is displayed stating the the image file cannot be opened.
Suggested Severity
- Seeing as how this only occurs for macOS platform, and the image can still be saved via other ways, I would consider this issue an S3
Regression range
- Will return with regression ASAP.
Additional notes
- This issue does not occur for Windows and Ubuntu platforms.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
This changes two bits of Firefox that, together with the mime service, end up
very confused over webp + jpeg.
- it changes contentAreaUtils.js' getDefaultExtension that if it gets an image
mimetype as the content type, it should ignore the URL. It doesn't have full channel
info so it can't really do better anyway. This fixes the context menu's "save image as..."
case. - it changes the external helper app service to do a few things slightly differently:
a. If we're told not to get an extension out of a URL, really don't. Don't just get the
filename and then get it from there anyway...
b. If we've got a suggested filename, and a primary extension for the mimetype,
and the extension on the file is not one of the known extensions for the mimetype,
replace it with the primary extension.
This fixes the link case.
It also adds tests for both of these mechanisms as well as "save image as."
Assignee | ||
Comment 3•4 years ago
|
||
So this patch works on macOS, but I'm not sure what else it breaks and I want to test it manually on Windows, too, before requesting review.
Trypush:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=642be104dc38028a23b05a9e8629dfa18c33ed3e
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/fc8c5c66f081 fix saving webp images served with jpeg extensions without content-disposition information, r=mak
Comment 5•4 years ago
|
||
Backed out for mochitest failure test_invalidCharFileExtension.xhtml
Backout link: https://hg.mozilla.org/integration/autoland/rev/6b44f18b8e693863a2eeef75fcfb450484a366be
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=318489846&repo=autoland&lineNumber=3569
Comment 6•4 years ago
|
||
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/19f174844357 fix saving webp images served with jpeg extensions without content-disposition information, r=mak
Comment 8•4 years ago
|
||
Backed out for bc failure on browser_bug676619.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/91b1f6713d7b675109d85f6c32d8420e4ce6f2f0
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=319053432&repo=autoland&lineNumber=2548
Assignee | ||
Updated•4 years ago
|
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ff2ad4b3e863 fix saving webp images served with jpeg extensions without content-disposition information, r=mak
Comment 10•4 years ago
|
||
Backed out for failures on test_nullCharFile.xhtml
backout: https://hg.mozilla.org/integration/autoland/rev/421ef74443011799bfb10c7f58138ad3709e34e5
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=319149100&repo=autoland&lineNumber=4921
[task 2020-10-20T16:16:29.910Z] 16:16:29 INFO - TEST-START | uriloader/exthandler/tests/mochitest/test_nullCharFile.xhtml
[task 2020-10-20T16:16:30.212Z] 16:16:30 INFO - GECKO(2915) | [Parent 2915, Main Thread] WARNING: '!aLoadingPrincipal || !aLoadingPrincipal->IsSystemPrincipal()', file /builds/worker/checkouts/gecko/dom/file/uri/BlobURLProtocolHandler.cpp:758
[task 2020-10-20T16:16:30.216Z] 16:16:30 INFO - TEST-INFO | started process screentopng
[task 2020-10-20T16:16:30.560Z] 16:16:30 INFO - TEST-INFO | screentopng: exit 0
[task 2020-10-20T16:16:30.560Z] 16:16:30 INFO - Buffered messages logged at 16:16:30
[task 2020-10-20T16:16:30.560Z] 16:16:30 INFO - add_task | Entering test
[task 2020-10-20T16:16:30.560Z] 16:16:30 INFO - Buffered messages finished
[task 2020-10-20T16:16:30.563Z] 16:16:30 INFO - TEST-UNEXPECTED-FAIL | uriloader/exthandler/tests/mochitest/test_nullCharFile.xhtml | got the expected sanitized name - got "test.html_.asc", expected "test.html_.png"
[task 2020-10-20T16:16:30.563Z] 16:16:30 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:500:14
[task 2020-10-20T16:16:30.563Z] 16:16:30 INFO - @uriloader/exthandler/tests/mochitest/test_nullCharFile.xhtml:32:7
[task 2020-10-20T16:16:30.563Z] 16:16:30 INFO - GECKO(2915) | [Parent 2915, Main Thread] WARNING: '!aLoadingPrincipal || !aLoadingPrincipal->IsSystemPrincipal()', file /builds/worker/checkouts/gecko/dom/file/uri/BlobURLProtocolHandler.cpp:758
[task 2020-10-20T16:16:30.564Z] 16:16:30 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-10-20T16:16:30.564Z] 16:16:30 INFO - TEST-UNEXPECTED-FAIL | uriloader/exthandler/tests/mochitest/test_nullCharFile.xhtml | got the expected sanitized name - got "test.html.asc", expected "test.html._png"
[task 2020-10-20T16:16:30.564Z] 16:16:30 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:500:14
[task 2020-10-20T16:16:30.564Z] 16:16:30 INFO - @uriloader/exthandler/tests/mochitest/test_nullCharFile.xhtml:32:7
[task 2020-10-20T16:16:30.565Z] 16:16:30 INFO - add_task | Leaving test
[task 2020-10-20T16:16:30.566Z] 16:16:30 INFO - GECKO(2915) | MEMORY STAT | vsize 2550MB | residentFast 144MB | heapAllocated 10MB
[task 2020-10-20T16:16:30.687Z] 16:16:30 INFO - TEST-OK | uriloader/exthandler/tests/mochitest/test_nullCharFile.xhtml | took 782ms
Assignee | ||
Comment 11•4 years ago
|
||
Hrmpf, try was green so I landed this an hour after bug 1637745 which landed the test that broke? Talk about bad luck.
Comment 12•4 years ago
|
||
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/a3815d601038 fix saving webp images served with jpeg extensions without content-disposition information, r=mak
Assignee | ||
Updated•4 years ago
|
Comment 13•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Comment 14•4 years ago
|
||
The patch landed in nightly and beta is affected.
:Gijs, is this bug important enough to require an uplift?
If not please set status_beta
to wontfix
.
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•4 years ago
|
Comment 15•4 years ago
|
||
It seems that this is happening on Windows 7 as well and probably Windows 10 too, as I just stumbled upon this issue while testing on 83.0b4.
Updated•4 years ago
|
Comment 16•4 years ago
|
||
(In reply to :Gijs (he/him) from comment #3)
... and I want to test it manually on Windows, too, before requesting review.
Windows 7: works for me
- using the image in https://www.reddit.com/r/pics/comments/jjfivx/entry_for_my_works_pumpkin_decorating_contest/
- Nightly 84.0a1 2020-10-28-092421 - saves as webp (file type not associated with Windows Photo Viewer which of course fails if you try)
- FF82.0.1 / Beta 83.0b5 - saves as .jpg, Windows Photo Viewer fails
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Comment 17•3 years ago
|
||
Hello,
Confirming this issue as verified fixed on 84.0(20201210144358) and 85.0a1(20201211093444) using Win10, macOS 10.15 .
Reporter | ||
Updated•3 years ago
|
Description
•