Skip to content
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

Image/media selector should not allow uploading unsupported media types #1345

Closed
vbradnitski opened this issue Jun 18, 2020 · 0 comments
Closed
Assignees
Labels
Bug Something isn't working

Comments

@vbradnitski
Copy link
Contributor

@alansemenov commented on Tue May 12 2020

In ImageSelector and MediaSelector we define file extensions that are allowed to be selected in the native file browser dialog. It's possible to work around this restriction by switching from "Customized Files" to "All files" and select ANY file, which will then be uploaded even though it might be of incorrect type, not supported by this selector.

Since we cannot do anything about this behaviour in the native dialog, we should have an additional check/filter on the server which will verify uploaded file against allowed types for the input type.

image

image

@vbradnitski vbradnitski self-assigned this Jun 18, 2020
@vbradnitski vbradnitski added the Bug Something isn't working label Jun 18, 2020
alansemenov added a commit that referenced this issue Jun 22, 2020
…#1346)

* Possible to upload an attachment of unallowed type in selectors #1345

* Update UploaderEl.ts

Co-authored-by: Alan Semenov <alansemenov@users.noreply.github.com>
@alansemenov alansemenov changed the title Possible to upload an attachment of unallowed type in selectors Image/media selector should not allow uploading unsupported media Jun 22, 2020
@alansemenov alansemenov changed the title Image/media selector should not allow uploading unsupported media Image/media selector should not allow uploading unsupported media types Jun 22, 2020
alansemenov pushed a commit that referenced this issue Jun 22, 2020
…#1346)

* Possible to upload an attachment of unallowed type in selectors #1345

* Update UploaderEl.ts

Co-authored-by: Alan Semenov <alansemenov@users.noreply.github.com>
(cherry picked from commit 05575e7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants