FIX: automatically timeout long running image magick commands (#12670)

Previously certain images may lead to convert / identify to run for unreasonable
amounts of time

This adds a maximum amount of time these commands can run prior to forcing
them to stop
This commit is contained in:
Sam
2021-04-12 13:55:54 +10:00
committed by GitHub
parent b6337b72f1
commit 5deda5ef3e
6 changed files with 37 additions and 9 deletions

View File

@@ -82,7 +82,7 @@ class ThemeStore::GitImporter
else
Discourse::Utils.execute_command("git", "clone", @url, @temp_folder)
end
rescue RuntimeError => err
rescue RuntimeError
raise RemoteTheme::ImportError.new(I18n.t("themes.import_error.git"))
end
end