jezdez/django-avatar — pull request #59 by miohtama (2013-07-18 22:39:43+00:00)
Title: Added image content type white list with python-magic

This adds extra hardening against user file uploads with optional python-magic dependency.

More of this security issue is explained here:

http://stackoverflow.com/questions/17607980/limiting-what-formats-pil-image-loads

An example project here:

https://github.com/miohtama/moot.it-single-signon-example

(Whitespace where sanitized according to PEP-8, sorry about that!)