sensenet icon indicating copy to clipboard operation
sensenet copied to clipboard

Prevent uploading unknown files as images PART 1 (by extension)

Open tusmester opened this issue 3 years ago • 0 comments

When we upload a file, it may become an image based on the allowed types on the parent. This lets us upload docx or pdf files as images. We have to restrict the extensions of files that can be uploaded as images to prevent uploading documents as images.

  • blacklist or whitelist?

Currently this is a UX issue, because uploading a docx file as an image can be confusing. Denying the upload by extension is only a partial solution, reading the first few bytes is more accurate, but a more expensive solution.

tusmester avatar Jun 01 '21 12:06 tusmester