WICG / entries-api

Spec defining browser support for file/directory upload by drag-and-drop
https://wicg.github.io/entries-api/
Other
41 stars 9 forks source link

Provide guidance on UI for user agent implementations #26

Open joshtriplett opened 6 years ago

joshtriplett commented 6 years ago

Given the ability to select a directory and upload it in its entirety, I can imagine a malicious site saying something like "please choose a directory to save your X in" or similar, and using that to lead a user into uploading their home directory or download folder.

Please consider including a "UI security considerations and guidelines for user agents" or similar, documenting potential threat models like that, and suggesting approaches such as making the file upload UI show a preview of the number of files that will be uploaded and the first few filenames, very explicitly using language that makes it clear the files will be sent to the site, and identifying the site.

inexorabletash commented 6 years ago

That sounds good. Want to write something up? PRs welcome!

(Since this document was describing reality rather than proposing something I didn't spent time on the niceties like a Security & Privacy section, but it should be added)

inexorabletash commented 5 years ago

Note that Chrome now shows an alert after selection, something like "You have selected 123 files to upload. Are you sure?" as a mitigation for the "upload your home directory" problem.