#580: Limit allowed "accepted" extensions in File System Access API file pickers.
Discussions
2021-03-15
Ken: no feedback. About what file extensions you can use, they added .c++ ... if you're adding that you need .c# and others commonly in use that are weird, I researched and aded screenshots and we haven't heard anything back.
Dan: will ping Chris H about it. Re-review in plenary and see if there's anything new
OpenedDec 2, 2020
HIQaH! QaH! TAG!
I'm requesting a TAG review of a small tweak to the File System Access API.
Initially the File System Access API (previously known as Native File System API) had no limitations on what strings were allowed to be used as accepted file extensions in the showOpenFilePicker and showSaveFilePicker methods.
Since the file picker (on most platforms) appends these extensions to the filename the user enters, this can result in filenames with characters we don’t want to allow/that are otherwise problematic. In particular we don't want to allow control characters or whitespace in suffixes, or filenames that end in a '.'. As such we add restrictions on what characters are allowed in accepts file extensions/suffixes, as well as limiting their length to 16.
Limiting extensions to only contain alphanumeric characters, + or . still allows all extensions in the shared-mime-info database as well as nearly all extensions in Wikipedia's List of filename extensions.
Further details:
You should also know that...
[please tell us anything you think is relevant to this review]
We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue and @-notify @mkruisselbrink