Closed vinitkumar closed 9 months ago
Attention: 11 lines
in your changes are missing coverage. Please review.
Comparison is base (
8293ba1
) 75.96% compared to head (34045eb
) 76.41%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@fsbraun Just checked it out. Looks and work great. Except I think this warning message could be better. Is show __all__
and some message.
O
Once that is fixed. I think it's good enough to be merged and we can cut a 3.1 release for filer.
Description
Filer allowed for the images for very high pixels (height * width) to be uploaded. This would cause crash and failures when the high pixels exceeded what is allowed by Pillow Image MAX_IMAGE_PIXELS value.
This is an issue because even though the image is possible to be created and attached to the page, it would never work as PIL always fails to thumbnails such high pixel image and crashes causing crash and high memory usages in such pages.
This patch, fixes this issues in the bud as it wouldn't allow such files to be uploaded via FILER itself. It also allows to set a lower limit FILER_MAX_IMAGE_PIXELS so that users can limit the max pixels to value much lower than what PIL support.
We also choose the pixel value rather than MAX_HEIGHT and MAX_WIDTH to allow different resolutions of image other than square images.
https://github.com/django-cms/django-filer/assets/537678/852f1ec2-ce5b-4eeb-80d1-f8eb070e5bfa
Github Issue
Authored-by: Vinit Kumar vinit.kumar@kidskonnect.nl
Related resources
Checklist
master