arc icon indicating copy to clipboard operation
arc copied to clipboard

More secure file validation?

Open madshargreave opened this issue 9 years ago • 1 comments

Hi

How can I safely validate avatars uploaded by users?

It seems to me that a user could easily just rename a virus.exe to avatar.png and pass the default validation.

Any ideas?

madshargreave avatar Apr 19 '16 12:04 madshargreave

I had the same problem so I built small lib checking MIME type of given file: https://gist.github.com/cichaczem/c3fb262b7cd284d75a46a77d1ff6506d

cichaczem avatar May 09 '16 14:05 cichaczem