puma 2.9.1-java → 2.9.2-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puma might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0922d7405e2fb42668eb994933edfcc57234ab01
4
- data.tar.gz: 8c287132402d71095f8210b61124fd75a7c96288
3
+ metadata.gz: 9c5302e337d939901eafe4a2737cdedc19add7c6
4
+ data.tar.gz: 539591af8ede4700c4f2bbc90c6628557b7022f1
5
5
  SHA512:
6
- metadata.gz: 999411b1b2fe55fa575aa87b2b513f7607fa79f8f83761d8685973386f1c097f2c8ea5b8613fd0e0c77982c51e432910e7ec31237aa2c0e6af981ebb7896819f
7
- data.tar.gz: 5ea012d1b1689c4da2e2be5272bc8b3785e037b7e3368bc33a04108ee3904abf100ffc5fc9ee06618b28d499bedd40fc5dc7a36cbfb37608f0eacb7650d037fa
6
+ metadata.gz: 71edc5ada3f65b2fe78e8ceb3f2fd63527189ff5c1676c5a4bcf08d9160779cc6033f32584f1739c2b5ff97408e06737ee884e3135f2b2ce164e68e669ccd4de
7
+ data.tar.gz: 530b558df353ee0506bcbad009e25b98937be32c1a9dde11c90332ad9b3a273b0324998628fe83e7cafb6fd3ae9cc7faf01a8913894bd206bdece1f7ec9603b0
@@ -1,3 +1,23 @@
1
+ === 2.9.2 / 1024-10-25
2
+
3
+ * 8 bug fixes:
4
+ * Fix puma-wild handling a restart properly. Fixes #550
5
+ * JRuby SSL POODLE update
6
+ * Keep deprecated features warnings
7
+ * Log the current time when Puma shuts down.
8
+ * Fix cross-platform extension library detection
9
+ * Use the correct Windows names for OpenSSL.
10
+ * Better error logging during startup
11
+ * Fixing sexist error messages
12
+
13
+ * 6 PRs merged:
14
+ * Merge pull request #549 from bsnape/log-shutdown-time
15
+ * Merge pull request #553 from lowjoel/master
16
+ * Merge pull request #568 from mariuz/patch-1
17
+ * Merge pull request #578 from danielbuechele/patch-1
18
+ * Merge pull request #581 from alexch/slightly-better-logging
19
+ * Merge pull request #590 from looker/jruby_disable_sslv3
20
+
1
21
  === 2.9.1 / 2014-09-05
2
22
 
3
23
  * 4 bug fixes:
data/README.md CHANGED
@@ -248,4 +248,4 @@ $ bundle exec rake
248
248
 
249
249
  ## License
250
250
 
251
- Puma is copyright 2013 Evan Phoenix and contributors. It is licensed under the BSD 3-Clause license. See the include LICENSE file for details.
251
+ Puma is copyright 2014 Evan Phoenix and contributors. It is licensed under the BSD 3-Clause license. See the include LICENSE file for details.
@@ -5,11 +5,25 @@
5
5
 
6
6
  require 'rubygems'
7
7
 
8
- deps = ARGV.shift.split(",").each do |s|
8
+ gems = ARGV.shift
9
+
10
+ inc = ""
11
+
12
+ if gems == "-I"
13
+ inc = ARGV.shift
14
+ $LOAD_PATH.concat inc.split(":")
15
+ gems = ARGV.shift
16
+ end
17
+
18
+ gems.split(",").each do |s|
9
19
  name, ver = s.split(":",2)
10
20
  gem name, ver
11
21
  end
12
22
 
23
+ module Puma; end
24
+
25
+ Puma.const_set("WILD_ARGS", ["-I", inc, gems])
26
+
13
27
  require 'puma/cli'
14
28
 
15
29
  cli = Puma::CLI.new ARGV
@@ -2,7 +2,8 @@ require 'mkmf'
2
2
 
3
3
  dir_config("puma_http11")
4
4
 
5
- $defs.push "-Wno-deprecated-declarations"
6
- $libs += " -lssl -lcrypto "
5
+ if %w'ssl ssleay32'.find {|ssl| have_library(ssl, 'SSL_CTX_new')} and
6
+ %w'crypto libeay32'.find {|crypto| have_library(crypto, 'BIO_read')}
7
7
 
8
- create_makefile("puma/puma_http11")
8
+ create_makefile("puma/puma_http11")
9
+ end
@@ -1,6 +1,7 @@
1
1
  package org.jruby.puma;
2
2
 
3
3
  import org.jruby.Ruby;
4
+ import org.jruby.RubyBoolean;
4
5
  import org.jruby.RubyClass;
5
6
  import org.jruby.RubyModule;
6
7
  import org.jruby.RubyObject;
@@ -151,6 +152,15 @@ public class MiniSSL extends RubyObject {
151
152
 
152
153
  sslCtx.init(kmf.getKeyManagers(), null, null);
153
154
  engine = sslCtx.createSSLEngine();
155
+
156
+ IRubyObject enableSSLv3 = miniSSLContext.callMethod(threadContext, "enable_SSLv3");
157
+ String[] protocols;
158
+ if (enableSSLv3 instanceof RubyBoolean && enableSSLv3.isTrue()) {
159
+ protocols = new String[] { "SSLv2Hello", "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2" };
160
+ } else {
161
+ protocols = new String[] { "TLSv1", "TLSv1.1", "TLSv1.2" };
162
+ }
163
+ engine.setEnabledProtocols(protocols);
154
164
  engine.setUseClientMode(false);
155
165
 
156
166
  SSLSession session = engine.getSession();
@@ -322,6 +322,7 @@ module Puma
322
322
 
323
323
  def graceful_stop
324
324
  @runner.stop_blocked
325
+ log "=== puma shutdown: #{Time.now} ==="
325
326
  log "- Goodbye!"
326
327
  end
327
328
 
@@ -362,7 +363,11 @@ module Puma
362
363
  lib = File.expand_path "lib"
363
364
  arg0[1,0] = ["-I", lib] if $:[0] == lib
364
365
 
365
- @restart_argv = arg0 + ARGV
366
+ if defined? Puma::WILD_ARGS
367
+ @restart_argv = arg0 + Puma::WILD_ARGS + ARGV
368
+ else
369
+ @restart_argv = arg0 + ARGV
370
+ end
366
371
  end
367
372
  end
368
373
 
@@ -430,6 +435,7 @@ module Puma
430
435
  Dir.chdir @restart_dir
431
436
 
432
437
  argv += [redirects] unless RUBY_VERSION < '1.9'
438
+
433
439
  Kernel.exec(*argv)
434
440
  end
435
441
  end
@@ -466,8 +472,9 @@ module Puma
466
472
 
467
473
  wild = File.expand_path(File.join(puma_lib_dir, "../bin/puma-wild"))
468
474
 
469
- args = [Gem.ruby] + dirs.map { |x| ["-I", x] }.flatten +
470
- [wild, deps] + @original_argv
475
+ wild_loadpath = dirs.join(":")
476
+
477
+ args = [Gem.ruby] + [wild, "-I", wild_loadpath, deps] + @original_argv
471
478
 
472
479
  Kernel.exec(*args)
473
480
  end
@@ -28,7 +28,7 @@ module Puma
28
28
  # too taxing on performance.
29
29
  module Const
30
30
 
31
- PUMA_VERSION = VERSION = "2.9.1".freeze
31
+ PUMA_VERSION = VERSION = "2.9.2".freeze
32
32
  CODE_NAME = "Team High Five".freeze
33
33
 
34
34
  FAST_TRACK_KA_TIMEOUT = 0.2
@@ -95,6 +95,11 @@ module Puma
95
95
  # jruby-specific Context properties: java uses a keystore and password pair rather than a cert/key pair
96
96
  attr_reader :keystore
97
97
  attr_accessor :keystore_pass
98
+ attr_accessor :enable_SSLv3
99
+
100
+ def initialize
101
+ @enable_SSLv3 = false
102
+ end
98
103
 
99
104
  def keystore=(keystore)
100
105
  raise ArgumentError, "No such keystore file '#{keystore}'" unless File.exist? keystore
Binary file
@@ -112,7 +112,7 @@ module Puma
112
112
  begin
113
113
  @app = @cli.config.app
114
114
  rescue Exception => e
115
- log "! Unable to load application"
115
+ log "! Unable to load application: #{e.class}: #{e.message}"
116
116
  raise e
117
117
  end
118
118
 
@@ -714,7 +714,7 @@ module Puma
714
714
  if @leak_stack_on_error
715
715
  [500, {}, ["Puma caught this error: #{e.message} (#{e.class})\n#{e.backtrace.join("\n")}"]]
716
716
  else
717
- [500, {}, ["A really lowlevel plumbing error occured. Please contact your local Maytag(tm) repair man.\n"]]
717
+ [500, {}, ["A really lowlevel plumbing error occured. Please contact your local Maytag(tm) repair person.\n"]]
718
718
  end
719
719
  end
720
720
 
@@ -16,21 +16,21 @@ class TestPumaServerSSL < Test::Unit::TestCase
16
16
 
17
17
  @app = lambda { |env| [200, {}, [env['rack.url_scheme']]] }
18
18
 
19
- ctx = Puma::MiniSSL::Context.new
19
+ @ctx = Puma::MiniSSL::Context.new
20
20
 
21
21
  if defined?(JRUBY_VERSION)
22
- ctx.keystore = File.expand_path "../../examples/puma/keystore.jks", __FILE__
23
- ctx.keystore_pass = 'blahblah'
22
+ @ctx.keystore = File.expand_path "../../examples/puma/keystore.jks", __FILE__
23
+ @ctx.keystore_pass = 'blahblah'
24
24
  else
25
- ctx.key = File.expand_path "../../examples/puma/puma_keypair.pem", __FILE__
26
- ctx.cert = File.expand_path "../../examples/puma/cert_puma.pem", __FILE__
25
+ @ctx.key = File.expand_path "../../examples/puma/puma_keypair.pem", __FILE__
26
+ @ctx.cert = File.expand_path "../../examples/puma/cert_puma.pem", __FILE__
27
27
  end
28
28
 
29
- ctx.verify_mode = Puma::MiniSSL::VERIFY_NONE
29
+ @ctx.verify_mode = Puma::MiniSSL::VERIFY_NONE
30
30
 
31
31
  @events = Puma::Events.new STDOUT, STDERR
32
32
  @server = Puma::Server.new @app, @events
33
- @server.add_ssl_listener @host, @port, ctx
33
+ @server.add_ssl_listener @host, @port, @ctx
34
34
  @server.run
35
35
 
36
36
  @http = Net::HTTP.new @host, @port
@@ -88,4 +88,50 @@ class TestPumaServerSSL < Test::Unit::TestCase
88
88
  assert_equal "https", body
89
89
  end
90
90
 
91
+ if defined?(JRUBY_VERSION)
92
+ def test_ssl_v3_support_disabled_by_default
93
+ @http.ssl_version='SSLv3'
94
+ assert_raises(OpenSSL::SSL::SSLError) do
95
+ @http.start do
96
+ Net::HTTP::Get.new '/'
97
+ end
98
+ end
99
+ end
100
+
101
+ def test_enabling_ssl_v3_support
102
+ @server.stop(true)
103
+ @ctx.enable_SSLv3 = true
104
+ @server = Puma::Server.new @app, @events
105
+ @server.add_ssl_listener @host, @port, @ctx
106
+ @server.run
107
+ @http.ssl_version='SSLv3'
108
+
109
+ body = nil
110
+ @http.start do
111
+ req = Net::HTTP::Get.new "/", {}
112
+
113
+ @http.request(req) do |rep|
114
+ body = rep.body
115
+ end
116
+ end
117
+
118
+ assert_equal "https", body
119
+ end
120
+
121
+ def test_enabling_ssl_v3_support_requires_true
122
+ @server.stop(true)
123
+ @ctx.enable_SSLv3 = "truthy but not true"
124
+ @server = Puma::Server.new @app, @events
125
+ @server.add_ssl_listener @host, @port, @ctx
126
+ @server.run
127
+ @http.ssl_version='SSLv3'
128
+
129
+ assert_raises(OpenSSL::SSL::SSLError) do
130
+ @http.start do
131
+ Net::HTTP::Get.new '/'
132
+ end
133
+ end
134
+ end
135
+ end
136
+
91
137
  end
metadata CHANGED
@@ -1,18 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.1
4
+ version: 2.9.2
5
5
  platform: java
6
6
  authors:
7
7
  - Evan Phoenix
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-05 00:00:00.000000000 Z
11
+ date: 2014-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rack
15
- version_requirements: !ruby/object:Gem::Requirement
14
+ requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - '>='
18
17
  - !ruby/object:Gem::Version
@@ -20,7 +19,10 @@ dependencies:
20
19
  - - <
21
20
  - !ruby/object:Gem::Version
22
21
  version: '2.0'
23
- requirement: !ruby/object:Gem::Requirement
22
+ name: rack
23
+ prerelease: false
24
+ type: :runtime
25
+ version_requirements: !ruby/object:Gem::Requirement
24
26
  requirements:
25
27
  - - '>='
26
28
  - !ruby/object:Gem::Version
@@ -28,50 +30,48 @@ dependencies:
28
30
  - - <
29
31
  - !ruby/object:Gem::Version
30
32
  version: '2.0'
31
- prerelease: false
32
- type: :runtime
33
33
  - !ruby/object:Gem::Dependency
34
- name: rdoc
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ~>
38
- - !ruby/object:Gem::Version
39
- version: '4.0'
40
34
  requirement: !ruby/object:Gem::Requirement
41
35
  requirements:
42
36
  - - ~>
43
37
  - !ruby/object:Gem::Version
44
38
  version: '4.0'
39
+ name: rdoc
45
40
  prerelease: false
46
41
  type: :development
47
- - !ruby/object:Gem::Dependency
48
- name: rake-compiler
49
42
  version_requirements: !ruby/object:Gem::Requirement
50
43
  requirements:
51
44
  - - ~>
52
45
  - !ruby/object:Gem::Version
53
- version: '0.8'
46
+ version: '4.0'
47
+ - !ruby/object:Gem::Dependency
54
48
  requirement: !ruby/object:Gem::Requirement
55
49
  requirements:
56
50
  - - ~>
57
51
  - !ruby/object:Gem::Version
58
52
  version: '0.8'
53
+ name: rake-compiler
59
54
  prerelease: false
60
55
  type: :development
61
- - !ruby/object:Gem::Dependency
62
- name: hoe
63
56
  version_requirements: !ruby/object:Gem::Requirement
64
57
  requirements:
65
58
  - - ~>
66
59
  - !ruby/object:Gem::Version
67
- version: '3.12'
60
+ version: '0.8'
61
+ - !ruby/object:Gem::Dependency
68
62
  requirement: !ruby/object:Gem::Requirement
69
63
  requirements:
70
64
  - - ~>
71
65
  - !ruby/object:Gem::Version
72
66
  version: '3.12'
67
+ name: hoe
73
68
  prerelease: false
74
69
  type: :development
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ~>
73
+ - !ruby/object:Gem::Version
74
+ version: '3.12'
75
75
  description: Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications. Puma is intended for use in both development and production environments. In order to get the best throughput, it is highly recommended that you use a Ruby implementation with real threads like Rubinius or JRuby.
76
76
  email:
77
77
  - evan@phx.io