You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash on dodgy image files (OSErrors and such) #125
In a large production deployment, we found some image files were crashing PIL. We didn't like that, and neither did our users.
Pull request #124 adds a new setting, VERSATILEIMAGEFIELD_CRASH_ON_BAD, default True to match current behaviour, for backwards compatibility.
Set it to False, and it will (won't?) do what it says on the tin. Crises (plural) averted. It'll still raise a warning though, in case you're interested.
this should be merged its literally insane that the whole app crashes if it can't find an image or there is some error with it. It should default to False because it is a potential denial of service condition if someone uploads a dodgy image.
This misbehavior (which is inherited from Django's ImageField) was the reason for me to finally bite the bullet and write my own imagefield. The code to check images on upload isn't very hard to write, but it was a bit tricky.
Anyway, just putting this out there. Using django-versatileimagefield was a pleasure, but I moved to something different.
Activity
budlight commentedon Dec 20, 2018
this should be merged its literally insane that the whole app crashes if it can't find an image or there is some error with it. It should default to False because it is a potential denial of service condition if someone uploads a dodgy image.
litchfield commentedon Dec 20, 2018
@budlight tell me about it! It's been 9 months. I'm wondering if anyone actually uses this thing for anything even half serious?
matthiask commentedon Feb 6, 2019
This misbehavior (which is inherited from Django's ImageField) was the reason for me to finally bite the bullet and write my own imagefield. The code to check images on upload isn't very hard to write, but it was a bit tricky.
Anyway, just putting this out there. Using django-versatileimagefield was a pleasure, but I moved to something different.