audit: make system check stricter with quotes.
As mentioned in: https://github.com/Homebrew/homebrew-core/pull/1396#discussion_r64774080
This commit is contained in:
parent
146a16d66b
commit
01b6787aa8
@ -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(" ", "\", \"")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user