aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2016-05-29 22:52:26 +0100
committerMike McQuaid2016-05-29 22:52:26 +0100
commit01b6787aa8969eeae26be401371e890d5924b992 (patch)
treed0fab24d3e0581e5667b8541fa1a3303bcfc83b8 /Library/Homebrew
parent146a16d66bc796f0c6a4c7e2b88f1b73fb0aaa4c (diff)
downloadbrew-01b6787aa8969eeae26be401371e890d5924b992.tar.bz2
audit: make system check stricter with quotes.
As mentioned in: https://github.com/Homebrew/homebrew-core/pull/1396#discussion_r64774080
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/audit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index c8512925b..e2ac9c44d 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -903,7 +903,7 @@ class FormulaAuditor
end
if @strict
- if line =~ /system (["'][^"' ]*(?:\s[^"' ]*)+["'])/
+ if line =~ /system ((["'])[^"' ]*(?:\s[^"' ]*)+\2)/
bad_system = $1
unless %w[| < > & ; *].any? { |c| bad_system.include? c }
good_system = bad_system.gsub(" ", "\", \"")