1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Merge RubyGems upstream: 56c0bbb69e4506bda7ef7f447dfec5db820df20b

It fixed the multiple vulnerabilities.
  https://blog.rubygems.org/2019/03/05/security-advisories-2019-03.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2019-03-05 03:32:58 +00:00
parent 593505ac6f
commit 08f8cfe14e
29 changed files with 653 additions and 183 deletions

View file

@ -239,10 +239,10 @@ EOF
response_fail = "You have enabled multifactor authentication but your request doesn't have the correct OTP code. Please check it and retry."
response_success = "Owner added successfully."
@stub_fetcher.data["#{Gem.host}/api/v1/gems/freewill/owners"] = proc do
@call_count ||= 0
(@call_count += 1).odd? ? [response_fail, 401, 'Unauthorized'] : [response_success, 200, 'OK']
end
@stub_fetcher.data["#{Gem.host}/api/v1/gems/freewill/owners"] = [
[response_fail, 401, 'Unauthorized'],
[response_success, 200, 'OK']
]
@otp_ui = Gem::MockGemUi.new "111111\n"
use_ui @otp_ui do