Commit a8a5fd52 authored by Jérome Perrin's avatar Jérome Perrin

Image: apply a timeout for conversion

parent 1a984890
...@@ -319,7 +319,7 @@ class Image(TextConvertableMixin, File, OFSImage): ...@@ -319,7 +319,7 @@ class Image(TextConvertableMixin, File, OFSImage):
def _resize(self, quality, width, height, format, resolution, frame): def _resize(self, quality, width, height, format, resolution, frame):
"""Resize and resample photo.""" """Resize and resample photo."""
parameter_list = ['convert', '-colorspace', 'sRGB', '-depth', '8', parameter_list = ['/usr/bin/timeout', '10', 'convert', '-colorspace', 'sRGB', '-depth', '8',
'-quality', str(quality), '-quality', str(quality),
'-geometry', '%sx%s' % (width, height)] '-geometry', '%sx%s' % (width, height)]
if format not in VALID_TRANSPARENT_IMAGE_FORMAT_LIST: if format not in VALID_TRANSPARENT_IMAGE_FORMAT_LIST:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment