SECURITY: force IM decoder based on file extension - part 2

This commit is contained in:
Régis Hanol
2018-07-25 23:08:02 +02:00
parent 4bf3bf6786
commit 800c57c6ab
2 changed files with 5 additions and 5 deletions

View File

@@ -166,12 +166,12 @@ class UploadCreator
"convert",
from,
"-auto-orient",
"-background white",
"-interlace none",
"-background", "white",
"-interlace", "none",
"-flatten",
"-quality #{SiteSetting.png_to_jpg_quality}"
"-quality", SiteSetting.png_to_jpg_quality.to_s
]
command << "-debug all" if debug
command << "-debug" << "all" if debug
command << to
Discourse::Utils.execute_command(*command, failure_message: I18n.t("upload.png_to_jpg_conversion_failure_message"))