mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Clear/mask passwords as well as tokens.
This commit is contained in:
parent
3f8f2c6726
commit
9358f678a3
@ -29,7 +29,7 @@ module EnvActivation
|
|||||||
|
|
||||||
def clear_sensitive_environment!
|
def clear_sensitive_environment!
|
||||||
ENV.each_key do |key|
|
ENV.each_key do |key|
|
||||||
next unless /(cookie|key|token)/i =~ key
|
next unless /(cookie|key|token|password)/i =~ key
|
||||||
ENV.delete key
|
ENV.delete key
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -207,7 +207,7 @@ class SystemConfig
|
|||||||
next unless key.start_with?("HOMEBREW_")
|
next unless key.start_with?("HOMEBREW_")
|
||||||
next if boring_keys.include?(key)
|
next if boring_keys.include?(key)
|
||||||
next if defaults_hash[key.to_sym] == value
|
next if defaults_hash[key.to_sym] == value
|
||||||
value = "set" if key =~ /(cookie|key|token)/i
|
value = "set" if key =~ /(cookie|key|token|password)/i
|
||||||
f.puts "#{key}: #{value}"
|
f.puts "#{key}: #{value}"
|
||||||
end
|
end
|
||||||
f.puts hardware if hardware
|
f.puts hardware if hardware
|
||||||
|
Loading…
x
Reference in New Issue
Block a user