Skip to content

Commit

Permalink
RubyGems 3.5+ will use vendored net-http
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Dec 13, 2023
1 parent f9f6ab1 commit 2523187
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions spec/ruby/security/cve_2019_8323_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
cutter = Class.new {
include Gem::GemcutterUtilities
}.new
response = Net::HTTPSuccess.new(nil, nil, nil)
klass = if defined?(Gem::Net::HTTPSuccess)
Gem::Net::HTTPSuccess
else
Net::HTTPSuccess
end
response = klass.new(nil, nil, nil)
def response.body
"\e]2;nyan\a"
end
Expand All @@ -25,7 +30,12 @@ def response.body
}.new
def cutter.terminate_interaction(n)
end
response = Net::HTTPNotFound.new(nil, nil, nil)
klass = if defined?(Gem::Net::HTTPNotFound)
Gem::Net::HTTPNotFound
else
Net::HTTPNotFound
end
response = klass.new(nil, nil, nil)
def response.body
"\e]2;nyan\a"
end
Expand Down

0 comments on commit 2523187

Please sign in to comment.