From dd134a7861e4168c553e201dab08cfcfa9b3e360 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Fri, 24 May 2013 15:58:58 -0700 Subject: sanitize passwords in URLs when caching metadata replace passwords with 'XXXX' when generating the file cache path to store cache control headers for that URI. --- lib/chef/provider/remote_file/cache_control_data.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/chef/provider/remote_file/cache_control_data.rb b/lib/chef/provider/remote_file/cache_control_data.rb index 068cdd94ad..5c3cd3cb9e 100644 --- a/lib/chef/provider/remote_file/cache_control_data.rb +++ b/lib/chef/provider/remote_file/cache_control_data.rb @@ -81,6 +81,8 @@ class Chef attr_reader :uri def initialize(uri) + uri = uri.dup + uri.password = "XXXX" unless uri.userinfo.nil? @uri = uri.to_s end -- cgit v1.2.1