encrypted_cookie_store-instructure 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/encrypted_cookie_store-instructure.gemspec +1 -1
- data/lib/encrypted_cookie_store.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16bc5314104030db889e71b9a6b4ccbd40f245e1
|
4
|
+
data.tar.gz: d47817a35a8ee124a2706e6ee1a6e1ff675b18bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04bc7d0af8da28a14faebedd2339474d6e8428c7e5c45346fc02cf6cea7e766c1915570b80e979e9025f32f24fe0baae034e5d7e1bd26b6c9d321e0199bc63d2
|
7
|
+
data.tar.gz: 1224858394a152b59a9d75805cc63984cb88a8df67f2f701c2dc7e48f6205b8ad69afb4f7d6ef6e3dbe47f6abe5291a0593a19f70435dc2a1dd367ac27393fbb
|
@@ -13,6 +13,12 @@ module ActionDispatch
|
|
13
13
|
end
|
14
14
|
self.data_cipher_type = "aes-128-cbc".freeze
|
15
15
|
|
16
|
+
SESSION_KEY = if Rack.release >= '2'
|
17
|
+
Rack::RACK_SESSION
|
18
|
+
else
|
19
|
+
Rack::Session::Abstract::ENV_SESSION_KEY
|
20
|
+
end
|
21
|
+
|
16
22
|
def initialize(app, options = {})
|
17
23
|
@logger = options.delete(:logger)
|
18
24
|
@digest = options.delete(:digest) || 'SHA1'
|
@@ -87,7 +93,7 @@ module ActionDispatch
|
|
87
93
|
def unpacked_cookie_data(req)
|
88
94
|
fetch_header(req, "action_dispatch.request.unsigned_session_cookie") do |k|
|
89
95
|
v = stale_session_check! do
|
90
|
-
if data = unmarshal(get_cookie(req))
|
96
|
+
if data = unmarshal(get_cookie(req), get_header(req, SESSION_KEY).options)
|
91
97
|
data.stringify_keys!
|
92
98
|
end
|
93
99
|
data ||= {}
|