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

More secure file validation? #61

Open
madshargreave opened this issue Apr 19, 2016 · 1 comment
Open

More secure file validation? #61

madshargreave opened this issue Apr 19, 2016 · 1 comment

Comments

@madshargreave
Copy link

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?

@cichaczem
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants