Skip to content

Commit

Permalink
Merge pull request #40 from dlcs/feature/decompression_bomb
Browse files Browse the repository at this point in the history
Increase PIL MAX_IMAGE_PIXELS to avoid decompression bomb warnings
  • Loading branch information
donaldgray authored Dec 1, 2023
2 parents a675af0 + e16bb1b commit 68f9a32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/ambv/black
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
Expand Down
3 changes: 3 additions & 0 deletions src/app/engine/rasterizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

from django.conf import settings
from pdf2image import convert_from_path
from PIL import Image

Image.MAX_IMAGE_PIXELS = 1000000000


class PdfRasterizer:
Expand Down

0 comments on commit 68f9a32

Please sign in to comment.