Git Product home page Git Product logo

Comments (8)

headius avatar headius commented on July 30, 2024

If I'm reading the sources right, it does not appear that the WEBrick shipped with Ruby 2.5.8 has these CVE patches either.

Ruby 2.5.8 claims to ship WEBrick 1.4.2, but it also has extensive diffs: https://gist.github.com/headius/9e70146870d5e6f329a5857fe91c8948

from webrick.

jeremyevans avatar jeremyevans commented on July 30, 2024

@hsbt What should we do here? Should we prepare a 1.4.3 release with all expected patches, and make sure Ruby 2.5.9 and 2.6.7 include it? I'm guessing that requires coordination with @unak.

I think on a going-forward basis, we should commit to making sure the webrick gem in Ruby releases matches the same gem you can download from rubygems.org.

from webrick.

headius avatar headius commented on July 30, 2024

On the JRuby side, we have just gone ahead and updated WEBrick in JRuby 9.2.12.0 to use the 1.6.0 release, since no other releases appeared to have all the CVE fixes we needed.

from webrick.

hsbt avatar hsbt commented on July 30, 2024

Ack

Should we prepare a 1.4.3 release with all expected patches, and make sure Ruby 2.5.9 and 2.6.7 include it?

I think it's the good plan to resolve the vulnerable code. Can anyone create the patchsets for this? I will coordinate its releases.

from webrick.

jeremyevans avatar jeremyevans commented on July 30, 2024

@hsbt #53 merges changes to webrick 1.4.2 from Ruby 2.6.6 and adds a few test changes to ensure the tests pass on 2.3-2.6. I think it is suitable to release as 1.4.3, and backport to Ruby 2.5 and 2.6.

from webrick.

hsbt avatar hsbt commented on July 30, 2024

I will release 1.4.3 from v1.4 branch soon.

from webrick.

hsbt avatar hsbt commented on July 30, 2024

I confirmed the difference between v1.4.2 and v1.4.3 is only version guard for the standalone gem.

$ g d test
diff --git test/webrick/test_httpproxy.rb test/webrick/test_httpproxy.rb
index a9f6f7d610..504eb1f915 100644
--- test/webrick/test_httpproxy.rb
+++ test/webrick/test_httpproxy.rb
@@ -213,7 +213,7 @@ def test_big_bodies
         end
       end
     end
-  end
+  end if RUBY_VERSION >= '2.5'

   def make_certificate(key, cn)
     subject = OpenSSL::X509::Name.parse("/DC=org/DC=ruby-lang/CN=#{cn}")
diff --git test/webrick/test_httpserver.rb test/webrick/test_httpserver.rb
index a6e70da7e8..2e5d44940c 100644
--- test/webrick/test_httpserver.rb
+++ test/webrick/test_httpserver.rb
@@ -253,7 +253,7 @@ def test_callbacks
       server.virtual_host(WEBrick::HTTPServer.new(vhost_config))

       Thread.pass while server.status != :Running
-      sleep 1 if RubyVM::MJIT.enabled? # server.status behaves unexpectedly with --jit-wait
+      sleep 1 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # server.status behaves unexpectedly with --jit-wait
       assert_equal(1, started, log.call)
       assert_equal(0, stopped, log.call)
       assert_equal(0, accepted, log.call)
diff --git test/webrick/test_server.rb test/webrick/test_server.rb
index 5f7f3a0b58..8162a186db 100644
--- test/webrick/test_server.rb
+++ test/webrick/test_server.rb
@@ -65,7 +65,7 @@ def test_callbacks
     }
     TestWEBrick.start_server(Echo, config){|server, addr, port, log|
       true while server.status != :Running
-      sleep 1 if RubyVM::MJIT.enabled? # server.status behaves unexpectedly with --jit-wait
+      sleep 1 if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # server.status behaves unexpectedly with --jit-wait
       assert_equal(1, started, log.call)
       assert_equal(0, stopped, log.call)
       assert_equal(0, accepted, log.call)

from webrick.

hsbt avatar hsbt commented on July 30, 2024

Released https://rubygems.org/gems/webrick/versions/1.4.3

from webrick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.