Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow Image.MAX_IMAGE_PIXELS to be None #1475

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

fsbraun
Copy link
Sponsor Member

@fsbraun fsbraun commented May 22, 2024

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

  • I have opened this pull request against master
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

@fsbraun fsbraun requested a review from a team May 22, 2024 14:34
@fsbraun fsbraun marked this pull request as ready for review May 22, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant