Closed Bug 1724890 Opened 5 years ago Closed 5 years ago

Number of Unique file type specifiers in <input> elements with type="file" restricted

Categories

(Core :: DOM: Forms, defect, P3)

Firefox 90
defect

Tracking

()

RESOLVED DUPLICATE of bug 1723629

People

(Reporter: marc.hanisch, Unassigned)

References

Details

Attachments

(1 file)

Attached file index.html —

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.

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.

Component: Untriaged → Layout: Form Controls
Product: Firefox → Core

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.

Component: Layout: Form Controls → DOM: Forms
See Also: → 1723629

(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-freearc to the first position and removing something else like application/x-abiword would still cause this issue.

Yes you're right. When removing all other MIME types except application/x-freearc the bug is still there.

Severity: -- → S3
Priority: -- → P3

I think I am going to dupe this to bug 1723629. Pretty sure that bug will cover this as well.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: