Clear/mask passwords as well as tokens.

This commit is contained in:
Mike McQuaid 2017-11-07 07:47:50 +00:00
parent 3f8f2c6726
commit 9358f678a3
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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