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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3fbe4d543a0ab0dc63aee18e2c1984acbd94c229
4
- data.tar.gz: 1a061703abd7f10a488ba13df95f68c0c26efc3b
3
+ metadata.gz: 16bc5314104030db889e71b9a6b4ccbd40f245e1
4
+ data.tar.gz: d47817a35a8ee124a2706e6ee1a6e1ff675b18bd
5
5
  SHA512:
6
- metadata.gz: c39d31f946f28eee76e0a27ff3499fc6581d0ca0490ffc34cf897ef4098b3e6a39a7a4bfe4ba4b50a222ba77afcefa9342c073ab1a808ecfb3a5d71a7cb864db
7
- data.tar.gz: 36acfa95153f029785e8a30017640cd2174770af9fb194c5fcae32f4e59590a0f17c3c4bdb439aa61a5ec7e54400586aa6620c671d3f453ae4d43b2695c7d066
6
+ metadata.gz: 04bc7d0af8da28a14faebedd2339474d6e8428c7e5c45346fc02cf6cea7e766c1915570b80e979e9025f32f24fe0baae034e5d7e1bd26b6c9d321e0199bc63d2
7
+ data.tar.gz: 1224858394a152b59a9d75805cc63984cb88a8df67f2f701c2dc7e48f6205b8ad69afb4f7d6ef6e3dbe47f6abe5291a0593a19f70435dc2a1dd367ac27393fbb
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{encrypted_cookie_store-instructure}
3
- s.version = "1.2.1"
3
+ s.version = "1.2.2"
4
4
 
5
5
  s.authors = ["Cody Cutrer", "Jacob Fugal", "James Williams"]
6
6
  s.date = %q{2013-12-20}
@@ -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 ||= {}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: encrypted_cookie_store-instructure
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer