Merge pull request #3201 from okriuchykhin/ok_SCI_5541

Fix file name sanitization in LibreOffice previewer [SCI-5541]
This commit is contained in:
Miha Mencin 2021-03-04 16:05:02 +01:00 committed by GitHub
commit 393204453b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ module ActiveStorage
begin
success = system(
"#{libreoffice_path} --headless --invisible --convert-to png --outdir #{work_dir} #{input.path}"
libreoffice_path, '--headless', '--invisible', '--convert-to', 'png', '--outdir', work_dir, input.path
)
unless success && File.file?(preview_file)