django-cms / django-filer

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

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

Closed fsbraun closed 3 months ago

fsbraun commented 6 months 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