rack-session 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80db83a32f94ca04708858cafb308daa26b94b9a4b95bdc74b92c288e56be8fd
4
- data.tar.gz: 5502c441c1466396ce483c159fde5b909bc93aac9245b440368baad03f2246ff
3
+ metadata.gz: c21a6aa8f00d76d5dde8f1afc2da45bcde88447531098da9fe7ef7407efc70ef
4
+ data.tar.gz: c8ba14832945493b7d94ef86bb98874bfb08a6ebd0c9628b4c4f61836bdb821f
5
5
  SHA512:
6
- metadata.gz: d7c2863fbe132f21f64fc6b03911e72af78a5d59557ad7ad1f370c6bd25411747e1b0f4f695bb87b52eb2ab1a1b80829f9757a1aec3f50d9ac1c99fe84d34481
7
- data.tar.gz: 5678a825dd79056f106e4e942d3b930a737ce27baf4da886a555215a903307691e9edcd2afdd494f85a39f8f605244d3e697b52cc0fed7548e44ac59c648afac
6
+ metadata.gz: fce1c317454f485dab13f3e08cf0a11094e5405213b3433d6686503343c061eedb6967df6f6daf94de4d7bfd84f78b89211a37f3373f1f65ca6597a432979f71
7
+ data.tar.gz: 9ba8c4880087e988ba6fb3f9211eec23f4c3ca070bb32efa8054c3fffd5dcdb53a80f7c914a9d6480903cc8307eb1b64fc07b37ad8a3f4c0f03277db94afaee3
@@ -215,7 +215,7 @@ module Rack
215
215
  # All parameters are optional.
216
216
  # * :key determines the name of the cookie, by default it is
217
217
  # 'rack.session'
218
- # * :path, :domain, :expire_after, :secure, :httponly, and :same_site set
218
+ # * :path, :domain, :expire_after, :secure, :httponly, :partitioned and :same_site set
219
219
  # the related cookie options as by Rack::Response#set_cookie
220
220
  # * :skip will not a set a cookie in the response nor update the session state
221
221
  # * :defer will not set a cookie in the response but still update the session
@@ -244,6 +244,7 @@ module Rack
244
244
  expire_after: nil,
245
245
  secure: false,
246
246
  httponly: true,
247
+ partitioned: false,
247
248
  defer: false,
248
249
  renew: false,
249
250
  sidbits: 128,
@@ -257,6 +258,7 @@ module Rack
257
258
  @app = app
258
259
  @default_options = self.class::DEFAULT_OPTIONS.merge(options)
259
260
  @key = @default_options.delete(:key)
261
+ @assume_ssl = @default_options.delete(:assume_ssl)
260
262
  @cookie_only = @default_options.delete(:cookie_only)
261
263
  @same_site = @default_options.delete(:same_site)
262
264
  initialize_sid
@@ -368,7 +370,7 @@ module Rack
368
370
 
369
371
  def security_matches?(request, options)
370
372
  return true unless options[:secure]
371
- request.ssl?
373
+ request.ssl? || @assume_ssl == true
372
374
  end
373
375
 
374
376
  # Acquires the session from the environment and the session id from
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Rack
7
7
  module Session
8
- VERSION = "2.0.0"
8
+ VERSION = "2.1.0"
9
9
  end
10
10
  end
data/releases.md ADDED
@@ -0,0 +1,23 @@
1
+ # Releases
2
+
3
+ ## v2.1.0
4
+
5
+ - Improved compatibility with Ruby 3.3+ and Rack 3+.
6
+ - Add support for cookie option `partitioned`.
7
+ - Introduce `assume_ssl` option to allow secure session cookies through insecure proxy.
8
+
9
+ ## v2.0.0
10
+
11
+ - Initial migration of code from Rack 2, for Rack 3 release.
12
+
13
+ ## v1.0.2
14
+
15
+ - Fix missing `rack/session.rb` file.
16
+
17
+ ## v1.0.1
18
+
19
+ - Pin to `rack < 3`.
20
+
21
+ ## v1.0.0
22
+
23
+ - Empty shim release for Rack 2.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-session
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -11,8 +11,22 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-01-18 00:00:00.000000000 Z
14
+ date: 2025-01-04 00:00:00.000000000 Z
15
15
  dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: base64
18
+ requirement: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.1.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 0.1.0
16
30
  - !ruby/object:Gem::Dependency
17
31
  name: rack
18
32
  requirement: !ruby/object:Gem::Requirement
@@ -112,11 +126,13 @@ files:
112
126
  - lib/rack/session/version.rb
113
127
  - license.md
114
128
  - readme.md
129
+ - releases.md
115
130
  - security.md
116
131
  homepage: https://github.com/rack/rack-session
117
132
  licenses:
118
133
  - MIT
119
- metadata: {}
134
+ metadata:
135
+ rubygems_mfa_required: 'true'
120
136
  post_install_message:
121
137
  rdoc_options: []
122
138
  require_paths:
@@ -125,14 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
125
141
  requirements:
126
142
  - - ">="
127
143
  - !ruby/object:Gem::Version
128
- version: 2.4.0
144
+ version: '2.5'
129
145
  required_rubygems_version: !ruby/object:Gem::Requirement
130
146
  requirements:
131
147
  - - ">="
132
148
  - !ruby/object:Gem::Version
133
149
  version: '0'
134
150
  requirements: []
135
- rubygems_version: 3.4.1
151
+ rubygems_version: 3.5.22
136
152
  signing_key:
137
153
  specification_version: 4
138
154
  summary: A session implementation for Rack.