Skip to content
Snippets Groups Projects
Commit f21c741e authored by Olivier Dony's avatar Olivier Dony
Browse files

[FIX] web_editor: limit size of generated images


This should avoid disrupting layouts.

closes odoo/odoo#75959

X-original-commit: baca6bd7
Signed-off-by: default avatarOlivier Dony (odo) <odo@openerp.com>
parent 8a48f5a4
Branches
Tags
No related merge requests found
......@@ -45,7 +45,7 @@ class Web_Editor(http.Controller):
:returns PNG image converted from given font
"""
# Make sure we have at least size=1
size = max(1, size)
size = max(1, min(size, 512))
# Initialize font
addons_path = http.addons_manifest['web']['addons_path']
font_obj = ImageFont.truetype(addons_path + font, size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment