rack 2.2.1 → 2.2.2

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecd99d8eb4cb36d36f656ff9f0d688f5e97cfc9c219ea61daf75cc11c5b213fe
4
- data.tar.gz: d61d3ae82e127877da8629b4d8f36fb8007b51793589c864f9632aed55bdc5fd
3
+ metadata.gz: 67bdec7711476ad2de84fac3e118909b94332330645a6d347e09e350c5bf3dd6
4
+ data.tar.gz: 301f4cd141d1601d82f3e68cb967566be6422f8020f9a3ec7da1b665c9f2f61c
5
5
  SHA512:
6
- metadata.gz: 4e2b43fae3062393ce93b0a9624177551a5aca4cb537203a99245b37ad97417f7f4e5d593ace93068cda6b8cce5fb111496caf46af90ff4ab16082b1d6927bd0
7
- data.tar.gz: 43f899d6905c51240e5b2ba429818a025596a0a7cdb7b447a3f2760c8af50999387d7f198e7a553befd82eb66784e16ad6cb8f6720e300904388fb07b6365917
6
+ metadata.gz: 3c3cca256c84546a8af5faa34d99249d34273f25b7d6b0fc04e9b9212b637872af7c782625674ca07cf33aadee4421c2e82579072613d06349324b7a89733e69
7
+ data.tar.gz: 1dd24e07c20fd0b8aca78f93b083549c6c04bcec8e73a8e8aadea1037b359d0ec39b247027ef08bcc7150ee61b22c92cfadf2c3698be30e5101d750bb353ddfa
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference [Keep A Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [2.2.2] - 2020-02-11
6
+
7
+ ### Fixed
8
+
9
+ - Fix incorrect `Rack::Request#host` value. ([#1591](https://github.com/rack/rack/pull/1591), [@ioquatix](https://github.com/ioquatix))
10
+ - Revert `Rack::Handler::Thin` implementation. ([#1583](https://github.com/rack/rack/pull/1583), [@jeremyevans](https://github.com/jeremyevans))
11
+ - Double assignment is still needed to prevent an "unused variable" warning. ([#1589](https://github.com/rack/rack/pull/1589), [@kamipo](https://github.com/kamipo))
12
+ - Fix to handle same_site option for session pool. ([#1587](https://github.com/rack/rack/pull/1587), [@kamipo](https://github.com/kamipo))
13
+
5
14
  ## [2.2.1] - 2020-02-09
6
15
 
7
16
  ### Fixed
@@ -12,20 +12,14 @@ module Rack
12
12
  environment = ENV['RACK_ENV'] || 'development'
13
13
  default_host = environment == 'development' ? 'localhost' : '0.0.0.0'
14
14
 
15
- if block_given?
16
- host = options.delete(:Host) || default_host
17
- port = options.delete(:Port) || 8080
18
- args = [host, port, app, options]
19
- # Thin versions below 0.8.0 do not support additional options
20
- args.pop if ::Thin::VERSION::MAJOR < 1 && ::Thin::VERSION::MINOR < 8
21
- server = ::Thin::Server.new(*args)
22
- yield server
23
- server.start
24
- else
25
- options[:address] = options[:Host] || default_host
26
- options[:port] = options[:Port] || 8080
27
- ::Thin::Controllers::Controller.new(options).start
28
- end
15
+ host = options.delete(:Host) || default_host
16
+ port = options.delete(:Port) || 8080
17
+ args = [host, port, app, options]
18
+ # Thin versions below 0.8.0 do not support additional options
19
+ args.pop if ::Thin::VERSION::MAJOR < 1 && ::Thin::VERSION::MINOR < 8
20
+ server = ::Thin::Server.new(*args)
21
+ yield server if block_given?
22
+ server.start
29
23
  end
30
24
 
31
25
  def self.valid_options
@@ -598,7 +598,7 @@ module Rack
598
598
  value ? value.strip.split(/[,\s]+/) : []
599
599
  end
600
600
 
601
- AUTHORITY = /
601
+ AUTHORITY = /^
602
602
  # The host:
603
603
  (?<host>
604
604
  # An IPv6 address:
@@ -612,7 +612,7 @@ module Rack
612
612
  )
613
613
  # The optional port:
614
614
  (:(?<port>\d+))?
615
- /x
615
+ $/x
616
616
 
617
617
  private_constant :AUTHORITY
618
618
 
@@ -252,6 +252,7 @@ module Rack
252
252
  @default_options = self.class::DEFAULT_OPTIONS.merge(options)
253
253
  @key = @default_options.delete(:key)
254
254
  @cookie_only = @default_options.delete(:cookie_only)
255
+ @same_site = @default_options.delete(:same_site)
255
256
  initialize_sid
256
257
  end
257
258
 
@@ -118,7 +118,6 @@ module Rack
118
118
  Called from: #{caller[0]}.
119
119
  MSG
120
120
  @coder = options[:coder] ||= Base64::Marshal.new
121
- @same_site = options.delete :same_site
122
121
  super(app, options.merge!(cookie_only: true))
123
122
  end
124
123
 
@@ -63,12 +63,12 @@ module Rack
63
63
  def pretty(env, exception)
64
64
  req = Rack::Request.new(env)
65
65
 
66
- # This double assignment is to prevent an "unused variable" warning on
67
- # Ruby 1.9.3. Yes, it is dumb, but I don't like Ruby yelling at me.
66
+ # This double assignment is to prevent an "unused variable" warning.
67
+ # Yes, it is dumb, but I don't like Ruby yelling at me.
68
68
  path = path = (req.script_name + req.path_info).squeeze("/")
69
69
 
70
- # This double assignment is to prevent an "unused variable" warning on
71
- # Ruby 1.9.3. Yes, it is dumb, but I don't like Ruby yelling at me.
70
+ # This double assignment is to prevent an "unused variable" warning.
71
+ # Yes, it is dumb, but I don't like Ruby yelling at me.
72
72
  frames = frames = exception.backtrace.map { |line|
73
73
  frame = OpenStruct.new
74
74
  if line =~ /(.*?):(\d+)(:in `(.*)')?/
@@ -23,14 +23,14 @@ module Rack
23
23
 
24
24
  # client or server error, or explicit message
25
25
  if (status.to_i >= 400 && empty) || env[RACK_SHOWSTATUS_DETAIL]
26
- # This double assignment is to prevent an "unused variable" warning on
27
- # Ruby 1.9.3. Yes, it is dumb, but I don't like Ruby yelling at me.
26
+ # This double assignment is to prevent an "unused variable" warning.
27
+ # Yes, it is dumb, but I don't like Ruby yelling at me.
28
28
  req = req = Rack::Request.new(env)
29
29
 
30
30
  message = Rack::Utils::HTTP_STATUS_CODES[status.to_i] || status.to_s
31
31
 
32
- # This double assignment is to prevent an "unused variable" warning on
33
- # Ruby 1.9.3. Yes, it is dumb, but I don't like Ruby yelling at me.
32
+ # This double assignment is to prevent an "unused variable" warning.
33
+ # Yes, it is dumb, but I don't like Ruby yelling at me.
34
34
  detail = detail = env[RACK_SHOWSTATUS_DETAIL] || message
35
35
 
36
36
  body = @template.result(binding)
@@ -20,7 +20,7 @@ module Rack
20
20
  VERSION.join(".")
21
21
  end
22
22
 
23
- RELEASE = "2.2.1"
23
+ RELEASE = "2.2.2"
24
24
 
25
25
  # Return the Rack release as a dotted string.
26
26
  def self.release
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leah Neukirchen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-09 00:00:00.000000000 Z
11
+ date: 2020-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest