Number of Unique file type specifiers in <input> elements with type="file" restricted
Categories
(Core :: DOM: Forms, defect, P3)
Tracking
()
People
(Reporter: marc.hanisch, Unassigned)
References
Details
Attachments
(1 file)
|
551 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0
Steps to reproduce:
Create an input element of type file with the following contents for the accept attribute:
<input type="file" accept="application/vnd.oasis.opendocument.presentation,application/vnd.oasis.opendocument.spreadsheet,application/vnd.oasis.opendocument.text,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.rar,application/x-7z-compressed,application/x-abiword,application/x-freearc" />
Actual results:
When the OS (Ubuntu 21.04 in my case) shows the file selection dialog, I can select files which are not specified in the list of allowed files.
When I remove the last file type from the list, it restricts the possible types of file the user can select in the dialog.
Expected results:
When the OS shows the file selection dialog, I'm not allowed to select files which are not specified in the list of allowed files.
Comment 1•5 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Form Controls' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•5 years ago
|
||
I spend some time debugging this. As far as I can tell this might be happening because GTK/Firefox can't find one of the specified MIME types. So I would imagine moving application/x-freearc to the first position and removing something else like application/x-abiword would still cause this issue.
| Reporter | ||
Comment 3•5 years ago
|
||
(In reply to Tom Schuster [:evilpie] from comment #2)
I spend some time debugging this. As far as I can tell this might be happening because GTK/Firefox can't find one of the specified MIME types. So I would imagine moving
application/x-freearcto the first position and removing something else likeapplication/x-abiwordwould still cause this issue.
Yes you're right. When removing all other MIME types except application/x-freearc the bug is still there.
Updated•5 years ago
|
Comment 4•5 years ago
|
||
I think I am going to dupe this to bug 1723629. Pretty sure that bug will cover this as well.
Description
•