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

Catch PIL.Image.DecompressionBombError #1605

Closed
pierotofy opened this issue Feb 16, 2025 · 0 comments · Fixed by #1608
Closed

Catch PIL.Image.DecompressionBombError #1605

pierotofy opened this issue Feb 16, 2025 · 0 comments · Fixed by #1608

Comments

@pierotofy
Copy link
Member

[2025-02-16 10:45:15,435: ERROR/ForkPoolWorker-173] worker.tasks.process_task[788fbe0d-226c-49ef-95e8-01e8f42d3093]: Uncaught error! This is potentially bad. Please report it to http://github.com/OpenDroneMap/WebODM/issues: Image size (494518510 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack. Traceback (most recent call last):
File "/webodm/worker/tasks.py", line 143, in process_task
task.process()
File "/webodm/app/models/task.py", line 634, in process
resized_images = self.resize_images()
File "/webodm/app/models/task.py", line 1182, in resize_images
resized_images = list(map(partial(resize_image, resize_to=self.resize_to, done=callback), images_path))
File "/webodm/app/models/task.py", line 127, in resize_image
im = Image.open(image_path)
File "/usr/local/lib/python3.9/dist-packages/PIL/Image.py", line 3009, in open
im = _open_core(fp, filename, prefix, formats)
File "/usr/local/lib/python3.9/dist-packages/PIL/Image.py", line 2996, in _open_core
_decompression_bomb_check(im.size)
File "/usr/local/lib/python3.9/dist-packages/PIL/Image.py", line 2905, in _decompression_bomb_check
raise DecompressionBombError(
PIL.Image.DecompressionBombError: Image size (494518510 pixels) exceeds limit of 178956970 pixels, could be decompression bomb DOS attack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant