From 9358f678a3c0a7ee6b64078cc9393d0c5347a17c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 7 Nov 2017 07:47:50 +0000 Subject: Clear/mask passwords as well as tokens. --- Library/Homebrew/extend/ENV.rb | 2 +- Library/Homebrew/system_config.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3