Comments (8)
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.
@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.
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.
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.
@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.
I will release 1.4.3 from v1.4
branch soon.
from webrick.
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.
Released https://rubygems.org/gems/webrick/versions/1.4.3
from webrick.
Related Issues (20)
- Is there any way to perform a connection upgrade (e.g. WebSockets) without monkey-patching `HTTPServer`? HOT 1
- WEBrick has an unsafe shutdown process it tries to concurrently write and close the @shutdown_pipe HOT 4
- Webrick `1.8.0` is incompatible with Rack `2.2.6.2` HOT 1
- Unicode handling in header location HOT 11
- test_httpresponse.rb test failures HOT 2
- MAX_URI_LENGTH exceeded results in nonsensical error HOT 2
- License on rubygems.org HOT 2
- POST/PUT with an empty body hangs forever HOT 3
- Allow PUT requests by default HOT 1
- Handle OpenSSL::SSL:SSLError HOT 4
- Support Relative URIs in Location Header HOT 2
- parsing multipart/form-data HOT 1
- HTTPProxyServer should not send Content-Length header in successful responses to CONNECT requests
- How does this relate to WEBrick that ships with Ruby? (asking for CVE-2009-4492) HOT 6
- `OpenSSL::SSL::SSLError: SSL_read: unexpected eof while reading` with OpenSSL 3.x HOT 3
- webrick missing as requirement? HOT 2
- `WEBrick::HTTPUtils.escape(nil)` raises a confusing exception
- WEBrick::HTTPProxyServer hangs when process exits HOT 1
- Ruby version is showing up in Webrick Headers, and we need to edit that for security reason HOT 4
- WEBRick::HTTPServer creates ipv6only socket for host `::` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webrick.