arc
arc copied to clipboard
More secure file validation?
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?
I had the same problem so I built small lib checking MIME type of given file: https://gist.github.com/cichaczem/c3fb262b7cd284d75a46a77d1ff6506d