aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-11-07 07:47:50 +0000
committerMike McQuaid2017-11-07 07:54:34 +0000
commit9358f678a3c0a7ee6b64078cc9393d0c5347a17c (patch)
treefd7c12330b5dbc0aee406b1517a47a663cd34e00
parent3f8f2c672632d74c188adab5d7fdc879ef0c008a (diff)
downloadbrew-9358f678a3c0a7ee6b64078cc9393d0c5347a17c.tar.bz2
Clear/mask passwords as well as tokens.
-rw-r--r--Library/Homebrew/extend/ENV.rb2
-rw-r--r--Library/Homebrew/system_config.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index ea1b99501..374be49b9 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -29,7 +29,7 @@ module EnvActivation
def clear_sensitive_environment!
ENV.each_key do |key|
- next unless /(cookie|key|token)/i =~ key
+ next unless /(cookie|key|token|password)/i =~ key
ENV.delete key
end
end
diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb
index e7e60c985..86b7051fa 100644
--- a/Library/Homebrew/system_config.rb
+++ b/Library/Homebrew/system_config.rb
@@ -207,7 +207,7 @@ class SystemConfig
next unless key.start_with?("HOMEBREW_")
next if boring_keys.include?(key)
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}"
end
f.puts hardware if hardware