encrypted_cookie_store-instructure 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/encrypted_cookie_store-instructure.gemspec +1 -1
- data/lib/encrypted_cookie_store.rb +8 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OTYzOGE2YWFiNzMwODE3OGI5NzY1NzY4ZWY1Y2RlMTlmYTUxZDZmOQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NDk2MWZkZWYwYjIwYTljZTBhZWFhODc2ZTkwMzFiNDBkMjViN2U5Mg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
OGJhNTFhZWFkMjU5YmY1OGI2N2EyNTY4NmRhYTJmMmUwMTE1YTFmNDRjNjgx
|
10
|
+
ZDljZjBiNmFjMTExZDVkY2EwMjg5N2IwYzkwOGE0OTQ3NzJlYTkxZmQ4NjI5
|
11
|
+
Mzk1NDZhY2EyYTViYzA5N2YzNzQ2ZjQxZmNiY2M2M2NhMmQ4NTk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MGU2ZTM0OTZlY2Q5NGVhNTQxYmQ4ZDVhODU1NDBkZTI5YWFlNjdlNzY3Zjli
|
14
|
+
MmQzMzRiZDc3ZGRmOWM1YmRjYmFmOGZiZjBmMjljMTI1MmVkYmU2MDQ0NjM4
|
15
|
+
OWIxNjk4ZjcyYjA4Yjc4MDE1YTc2MWQwZGZjY2Q3N2U0NjEzZjA=
|
@@ -14,6 +14,7 @@ class EncryptedCookieStore < ActionController::Session::CookieStore
|
|
14
14
|
|
15
15
|
def initialize(app, options = {})
|
16
16
|
options[:secret] = options[:secret].call if options[:secret].respond_to?(:call)
|
17
|
+
@logger = options.delete(:logger)
|
17
18
|
ensure_encryption_key_secure(options[:secret])
|
18
19
|
@encryption_key = unhex(options[:secret]).freeze
|
19
20
|
@compress = options[:compress]
|
@@ -111,7 +112,13 @@ private
|
|
111
112
|
return [nil, nil, nil] unless timestamp
|
112
113
|
return [nil, nil, timestamp] unless Time.now.utc.to_i - timestamp < @options[:expire_after]
|
113
114
|
end
|
114
|
-
|
115
|
+
loaded_data = nil
|
116
|
+
begin
|
117
|
+
loaded_data = Marshal.load(session_data)
|
118
|
+
rescue
|
119
|
+
@logger.error("Could not unmarshal session_data: #{session_data.inspect}") if @logger
|
120
|
+
end
|
121
|
+
[loaded_data, session_data, timestamp]
|
115
122
|
else
|
116
123
|
[nil, nil, nil]
|
117
124
|
end
|
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.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
@@ -21,8 +21,8 @@ extra_rdoc_files:
|
|
21
21
|
files:
|
22
22
|
- LICENSE.txt
|
23
23
|
- README.markdown
|
24
|
-
- lib/encrypted_cookie_store.rb
|
25
24
|
- encrypted_cookie_store-instructure.gemspec
|
25
|
+
- lib/encrypted_cookie_store.rb
|
26
26
|
homepage: http://github.com/ccutrer/encrypted_cookie_store
|
27
27
|
licenses: []
|
28
28
|
metadata: {}
|
@@ -32,18 +32,19 @@ require_paths:
|
|
32
32
|
- lib
|
33
33
|
required_ruby_version: !ruby/object:Gem::Requirement
|
34
34
|
requirements:
|
35
|
-
- - '>='
|
35
|
+
- - ! '>='
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '0'
|
38
38
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- - '>='
|
40
|
+
- - ! '>='
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
requirements: []
|
44
44
|
rubyforge_project:
|
45
|
-
rubygems_version: 2.0
|
45
|
+
rubygems_version: 2.3.0
|
46
46
|
signing_key:
|
47
47
|
specification_version: 4
|
48
48
|
summary: EncryptedCookieStore for Ruby on Rails 2.3
|
49
49
|
test_files: []
|
50
|
+
has_rdoc:
|