-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicitly state that UA can reject file based on its type #127
Comments
It actually does have this (search for the word "block"). But it needs to change to split it out from the user activation check, and move it into the "in parallel" steps, so it can be done async. |
Over on the gecko side, we've been considering the following attack: const evil = new File([...evilBytes], "cat.exe");
navigator.share({files: [evil], title: "Cute cat image!"}); In order to mitigate the above, we should require each This also allows us to avoid having to do content type sniffing, although that could be done as well. So, concretely, we should replace:
With a lookup-table for allowed MIME + extensions-list combinations. |
TPAC 2020: Resolved to make a change to the spec to let browsers determine their own rules for blocking based on file type. We can discuss further having a formal list of allowed / blocked types, but no consensus on that. @NotWoods suggests https://html.spec.whatwg.org/multipage/links.html#allowed-to-download as a starting point. |
The HTML suggestion relates to the |
List of extensions / types from Chromium : https://docs.google.com/document/d/1tKPkHA5nnJtmh2TgqWmGSREUzXgMUFDL6yMdVZHqUsg/edit |
closing as handled by 6c0a9f5 for now. |
With examples to prevent sharing of executable files.
Could be based on extension, MIME type or contents.
The text was updated successfully, but these errors were encountered: