django-cms / django-filer

File and Image Management Application for django
https://django-filer.readthedocs.io/
Other
1.73k stars 574 forks source link

fix: Allow `Image.MAX_IMAGE_PIXELS` to be `None` #1475

Open fsbraun opened 1 month ago

fsbraun commented 1 month ago

Description

Related resources

We discourage to do this, but PIL.Image.MAX_IMAGE_PIXELS can be None. If so, please specify FILE_MAX_IMAGE_SIZE in your settings.py. If both are not set, any admin user can upload images as big as they wish opening up any project to memory bombs.

This PR allows PIL.Image.MAX_IMAGE_PIXELS to be None. If both PIL.Image.MAX_IMAGE_PIXELS and settings.FILER_MAX_IMAGE_PIXELS are not set, the checks framework will raise a warning.

Checklist