summaryrefslogtreecommitdiff
path: root/lib/rubygems/errors.rb
diff options
context:
space:
mode:
authorhuangduirong <huangduirong@huawei.com>2021-09-09 15:24:41 +0800
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-09-24 10:57:03 +0900
commitb1ab1ee046816b021a3cbd0a08bfce0e459beb4b (patch)
treeefdfdaedbab0d50b4004ec5834dd4ff76905d048 /lib/rubygems/errors.rb
parent63297c2ca494661bdf5536a3c5d3a1c8d68d2d64 (diff)
[rubygems/rubygems] Fix error message building changing password of source
Do not change the password of the input parameter source during anonymization, by using the proper helper instead of changing the original uri directly. https://github.com/rubygems/rubygems/commit/eaa2dd8a97
Diffstat (limited to 'lib/rubygems/errors.rb')
-rw-r--r--lib/rubygems/errors.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rubygems/errors.rb b/lib/rubygems/errors.rb
index abee20651e..86f0d1da14 100644
--- a/lib/rubygems/errors.rb
+++ b/lib/rubygems/errors.rb
@@ -171,8 +171,7 @@ module Gem
# An English description of the error.
def wordy
- @source.uri.password = 'REDACTED' unless @source.uri.password.nil?
- "Unable to download data from #{@source.uri} - #{@error.message}"
+ "Unable to download data from #{Gem::Uri.new(@source.uri).redacted} - #{@error.message}"
end
##