downloads.download throws if the folder name contains a dot and a space
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(firefox-esr115 affected, firefox127 wontfix, firefox128 affected, firefox129 affected)
People
(Reporter: eight04, Unassigned, NeedInfo)
References
Details
(Keywords: regression)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0
Steps to reproduce:
- Download and install the extension: https://github.com/eight04/webextension-test/archive/refs/heads/illegal-filename-2.zip
- Click the extension button to trigger browserAction.
- Inspect the background page and open the console.
Actual results:
Two errors are thrown:
Error: filename must not contain illegal characters
Expected results:
Two files are downloaded correctly with FF126 and Edge.
Reported by https://github.com/eight04/image-picka/issues/347#issuecomment-2173368486
Comment 1•16 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•14 days ago
|
||
I guess this is because we're intending to replace the space with _
in the file extension after bug 1891234. Neil, does that sound right? Can we refine the replacement so it doesn't affect the case reported here? (looks like it's a filename that contains .
followed by somewhere, before the final
.jpg
)
I am not able to see any errors in consoles in FF 127 and 129, but also the files expected to be downloaded are not present.
Can you please attach a video or a screenshot with the errors?
I started the browser via web-ext
. Does it affect logging?
Comment 5•10 days ago
|
||
Hello,
I reproduced the issue on the latest Nightly (129.0a1/20240625213230), Beta (128.0b7/20240624113619) and Release (127.0.2/20240624183754) under Windows 10 x64 and Ubuntu 22.04 LTS.
Clicking the extension button will throw two errors as mentioned in Comment 0 and the files are not downloaded. See the attached screenshots for more details.
Comment 6•10 days ago
|
||
Updated•5 days ago
|
Updated•5 days ago
|
Updated•4 days ago
|
Comment 8•4 days ago
|
||
:robwu do you plan on making a similar fix as in Bug 1898498?
:zombie could this be triaged for severity?
Comment 9•4 days ago
|
||
I'm not planning to do the same fix as bug 1898498, because I don't think that we should disallow directories in the format blabla<dot><space>something
.
I think that we need to use a different mechanism to verify whether an input is an acceptable directory name, because DownloadPaths.sanitize
is now too strict.
Description
•