summaryrefslogtreecommitdiff
path: root/lib/bundler/settings.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r--lib/bundler/settings.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index abf7db21b4..450f57e3d3 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -419,7 +419,15 @@ module Bundler
elsif is_credential(key)
"[REDACTED]"
elsif is_userinfo(converted)
- converted.gsub(/:.*$/, ":[REDACTED]")
+ username, pass = converted.split(":")
+
+ if pass == "x-oauth-basic"
+ username = "[REDACTED]"
+ else
+ pass = "[REDACTED]"
+ end
+
+ [username, pass].join(":")
else
converted
end