Bug 1744779 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

When trying to download a screenshot from a page whose title has certain non-allowed characters, saving on disk fails without any visual feedback.

STR:
1. Go to https://addons.mozilla.org/he/firefox/addon/multi-account-containers/ .
2. Use the Screenshots feature to a screenshot.
3. Click "Download".

Expected result:
The downloaded screenshot should be on the disk.

Actual result:
The screenshot file isn't on the disk.

Additional information:
* For RTL locales on addons.mozilla.org, the first character of the page title (which is used as part of the screenshot filename) is U+200F.
* The downloads API at https://searchfox.org/mozilla-central/toolkit/components/extensions/parent/ext-downloads.js#671 (which is called by https://searchfox.org/mozilla-central/source/browser/extensions/screenshots/background/main.js#207-212) rejects the promise because the sanitizer (https://searchfox.org/mozilla-central/source/toolkit/components/downloads/DownloadPaths.jsm#75-90) detected illegal characters, in this case U+200F.
* Screenshots doesn't check for the result of the promise and never notices that it got rejected.
When trying to download a screenshot from a page whose title has certain non-allowed characters, saving on disk fails without any visual feedback.

STR:
1. Go to https://addons.mozilla.org/he/firefox/addon/multi-account-containers/ .
2. Use the Screenshots feature to a screenshot.
3. Click "Download".

Expected result:
The downloaded screenshot should be on the disk.

Actual result:
The screenshot file isn't on the disk.

Additional information:
* For RTL locales on addons.mozilla.org, the first character of the page title (which is used as part of the screenshot filename) is U+200F.
* The downloads API at https://searchfox.org/mozilla-central/source/toolkit/components/extensions/parent/ext-downloads.js#671 (which is called by https://searchfox.org/mozilla-central/source/browser/extensions/screenshots/background/main.js#207-212) rejects the promise because the sanitizer (https://searchfox.org/mozilla-central/source/toolkit/components/downloads/DownloadPaths.jsm#75-90) detected illegal characters, in this case U+200F.
* Screenshots doesn't check for the result of the promise and never notices that it got rejected.

Back to Bug 1744779 Comment 0