Closed
Bug 1469216
Opened 7 years ago
Closed 7 years ago
downloads.download should sanitize filename
Categories
(WebExtensions :: General, defect)
WebExtensions
General
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: kernp25, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:62.0) Gecko/20100101 Firefox/62.0
Build ID: 20180617100056
Actual results:
https://bugzilla.mozilla.org/show_bug.cgi?id=1402279 added DownloadPaths.sanitize method.
I have to copy the DownloadPaths.sanitize code, just to make sure, downloads.download will not fail.
Expected results:
downloads.download should sanitize the given filename.
Comment 1•7 years ago
|
||
download() does sanitize a provided filename:
https://searchfox.org/mozilla-central/rev/285da1fd7dcf67448b9175741fa330158edcff73/toolkit/components/extensions/parent/ext-downloads.js#430
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
(In reply to Andrew Swan [:aswan] from comment #1)
> download() does sanitize a provided filename:
> https://searchfox.org/mozilla-central/rev/
> 285da1fd7dcf67448b9175741fa330158edcff73/toolkit/components/extensions/
> parent/ext-downloads.js#430
Yeah, but only to check, if the filename is correct :)
From https://bugzilla.mozilla.org/show_bug.cgi?id=1390473#c5
> and catching errors when that fails.
An add-on must handle error anyway, but it should be the job of the browser, to fix the given filename.
Like it does with the filename of the url.
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•