From: Markus Doits Date: Mon, 25 Jul 2016 14:55:42 +0000 (+0200) Subject: escape file path before passing it to shell X-Git-Tag: v0.1.0~43 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=13c41e366ef7a079b665543aca58c94c8f15c49a;p=github%2Ffretlink%2Fpronto-hlint.git escape file path before passing it to shell --- diff --git a/lib/pronto/eslint.rb b/lib/pronto/eslint.rb index fa4261d..d57a408 100644 --- a/lib/pronto/eslint.rb +++ b/lib/pronto/eslint.rb @@ -16,7 +16,7 @@ module Pronto offences = Dir.chdir(@_repo_path) do - JSON.parse(`eslint #{patch.new_file_full_path} -f json`) + JSON.parse(`eslint #{Shellwords.escape(patch.new_file_full_path)} -f json`) end offences =