File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1616# limitations under the License.
1717
1818require 'java_buildpack/util'
19+ require 'java_buildpack/util/sanitizer'
1920require 'pathname'
2021
2122module JavaBuildpack
@@ -37,7 +38,7 @@ def override_default_config_remote
3738 JavaBuildpack ::Util ::Cache ::InternetAvailability . instance . available (
3839 true , "The #{ self . class . name } remote configuration download location is always accessible"
3940 ) do
40- @logger . info { "Downloading override configuration files from #{ external_config_root } " }
41+ @logger . info { "Downloading override configuration files from #{ external_config_root . sanitize_uri } " }
4142 self . class ::CONFIG_FILES . each do |conf_file |
4243 uri = URI ( external_config_root + conf_file )
4344
@@ -79,10 +80,11 @@ def check_if_resource_exists(resource_uri, conf_file)
7980 true
8081 when Net ::HTTPRedirection
8182 location = response [ 'location' ]
82- @logger . info { "redirected to #{ location } " }
83+ @logger . info { "redirected to #{ location . sanitize_uri } " }
8384 check_if_resource_exists ( location , conf_file )
8485 else
85- @logger . info { "Could not retrieve #{ resource_uri } . Code: #{ response . code } Message: #{ response . message } " }
86+ clean_url = resource_uri . to_s . sanitize_uri
87+ @logger . info { "Could not fetch #{ clean_url } . Code: #{ response . code } - #{ response . message } " }
8688 false
8789 end
8890 end
You can’t perform that action at this time.
0 commit comments