encrypted_cookie_store-instructure 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 62d4b361cb0953c92a3f1c9b7e5fc32df317243c
4
- data.tar.gz: b06a45d5b25dea1e5c6ea69cd783bb8d43ef1c18
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OTYzOGE2YWFiNzMwODE3OGI5NzY1NzY4ZWY1Y2RlMTlmYTUxZDZmOQ==
5
+ data.tar.gz: !binary |-
6
+ NDk2MWZkZWYwYjIwYTljZTBhZWFhODc2ZTkwMzFiNDBkMjViN2U5Mg==
5
7
  SHA512:
6
- metadata.gz: 3e6377fadcb73c05ca5a762ac663195cd89f4e295e74b5e19788e71cbf8ca94ec1e1fe91f64ce2e1b5e02fe2466ad7e804b156f57c5f1d1671038b93dd74f7d0
7
- data.tar.gz: cadda0df9d6174f7cc33ce7a4c15632a228cf98dca3a5624a31aac3e16ff6041d8531834bef88bfb6cf6fb59ed011ef039bf6630d9e3a4385b4670339e6051e3
8
+ metadata.gz: !binary |-
9
+ OGJhNTFhZWFkMjU5YmY1OGI2N2EyNTY4NmRhYTJmMmUwMTE1YTFmNDRjNjgx
10
+ ZDljZjBiNmFjMTExZDVkY2EwMjg5N2IwYzkwOGE0OTQ3NzJlYTkxZmQ4NjI5
11
+ Mzk1NDZhY2EyYTViYzA5N2YzNzQ2ZjQxZmNiY2M2M2NhMmQ4NTk=
12
+ data.tar.gz: !binary |-
13
+ MGU2ZTM0OTZlY2Q5NGVhNTQxYmQ4ZDVhODU1NDBkZTI5YWFlNjdlNzY3Zjli
14
+ MmQzMzRiZDc3ZGRmOWM1YmRjYmFmOGZiZjBmMjljMTI1MmVkYmU2MDQ0NjM4
15
+ OWIxNjk4ZjcyYjA4Yjc4MDE1YTc2MWQwZGZjY2Q3N2U0NjEzZjA=
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{encrypted_cookie_store-instructure}
3
- s.version = "1.0.6"
3
+ s.version = "1.0.7"
4
4
 
5
5
  s.authors = ["Cody Cutrer", "Jacob Fugal", "James Williams"]
6
6
  s.date = %q{2013-12-20}
@@ -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
- [(Marshal.load(session_data) rescue nil), session_data, timestamp]
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.6
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.14
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: