Closed Bug 1778880 Opened 2 years ago Closed 2 years ago

downloads.download rejects valid characters on filename

Categories

(WebExtensions :: General, defect)

Firefox 102
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1778429

People

(Reporter: ytoku, Unassigned)

References

(Regression)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0

Steps to reproduce:

In a WebExtensions Add-on,
download a file by downloads.download() with a filename including half-width kana characters.

browser.downloads.download({
...
filename: 'path/to/カタカナ.jpg',
})

Actual results:

downloads.download() rejects half-width kana characters and throws an exception:
Error: filename must not contain illegal characters

Expected results:

downloads.download() accepts the specified filename and saves the file as the specified filename.

The Bugbug bot thinks this bug should belong to the 'Firefox::Downloads Panel' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Downloads Panel
Component: Downloads Panel → General
Product: Firefox → WebExtensions

Another example:
emoji + slash is also rejected.

browser.downloads.download({
...
filename: 'path/to/a😀/x.png',
})
See Also: → 1778894

Bug 1778894 mentions that this may be a regression from 1746052. Does it work in Firefox versions lower than 101?

Flags: needinfo?(ytoku42+github)
See Also: 17788941746052

I have confirmed that it works correctly in Firefox 91.11.0esr and Firefox 101.0.1.
The problem is introduced in Firefox 102.

Flags: needinfo?(ytoku42+github)

Thanks, the regressor is most likely bug 1746052 then.

Regressed by: 1746052
See Also: 1746052
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.