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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/rack/handler/thin.rb +8 -14
- data/lib/rack/request.rb +2 -2
- data/lib/rack/session/abstract/id.rb +1 -0
- data/lib/rack/session/cookie.rb +0 -1
- data/lib/rack/show_exceptions.rb +4 -4
- data/lib/rack/show_status.rb +4 -4
- data/lib/rack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67bdec7711476ad2de84fac3e118909b94332330645a6d347e09e350c5bf3dd6
|
4
|
+
data.tar.gz: 301f4cd141d1601d82f3e68cb967566be6422f8020f9a3ec7da1b665c9f2f61c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c3cca256c84546a8af5faa34d99249d34273f25b7d6b0fc04e9b9212b637872af7c782625674ca07cf33aadee4421c2e82579072613d06349324b7a89733e69
|
7
|
+
data.tar.gz: 1dd24e07c20fd0b8aca78f93b083549c6c04bcec8e73a8e8aadea1037b359d0ec39b247027ef08bcc7150ee61b22c92cfadf2c3698be30e5101d750bb353ddfa
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/lib/rack/handler/thin.rb
CHANGED
@@ -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
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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
|
data/lib/rack/request.rb
CHANGED
@@ -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
|
-
|
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
|
|
data/lib/rack/session/cookie.rb
CHANGED
data/lib/rack/show_exceptions.rb
CHANGED
@@ -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
|
67
|
-
#
|
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
|
71
|
-
#
|
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 `(.*)')?/
|
data/lib/rack/show_status.rb
CHANGED
@@ -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
|
27
|
-
#
|
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
|
33
|
-
#
|
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)
|
data/lib/rack/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|