encrypted_cookie_store-instructure 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -28,6 +28,7 @@ class EncryptedCookieStore < ActionController::Session::CookieStore
|
|
28
28
|
old_session_data, raw_old_session_data, old_timestamp = all_unpacked_cookie_data(env)
|
29
29
|
# make sure we have a deep copy
|
30
30
|
old_session_data = Marshal.load(raw_old_session_data) if raw_old_session_data
|
31
|
+
env['encrypted_cookie_store.session_refreshed_at'] ||= session_refreshed_at(old_timestamp, env)
|
31
32
|
|
32
33
|
status, headers, body = @app.call(env)
|
33
34
|
|
@@ -133,6 +134,11 @@ private
|
|
133
134
|
all_unpacked_cookie_data(env).first
|
134
135
|
end
|
135
136
|
|
137
|
+
def session_refreshed_at(timestamp, env)
|
138
|
+
expire_after = env[ENV_SESSION_OPTIONS_KEY][:expire_after] || @options[:expire_after]
|
139
|
+
Time.at(timestamp).utc - expire_after if timestamp && expire_after
|
140
|
+
end
|
141
|
+
|
136
142
|
# To prevent users from using an insecure encryption key like "Password" we make sure that the
|
137
143
|
# encryption key they've provided is at least 30 characters in length.
|
138
144
|
def ensure_encryption_key_secure(encryption_key)
|
metadata
CHANGED
@@ -1,69 +1,51 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: encrypted_cookie_store-instructure
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 2
|
10
|
-
version: 1.0.2
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
- Cody
|
7
|
+
authors:
|
8
|
+
- Cody Cutrer
|
9
|
+
- Jacob Fugal
|
14
10
|
autorequire:
|
15
11
|
bindir: bin
|
16
12
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2012-05-11 00:00:00 Z
|
13
|
+
date: 2012-05-11 00:00:00.000000000 Z
|
19
14
|
dependencies: []
|
20
|
-
|
21
15
|
description: A secure version of Rails' built in CookieStore
|
22
16
|
email:
|
23
17
|
executables: []
|
24
|
-
|
25
18
|
extensions: []
|
26
|
-
|
27
|
-
extra_rdoc_files:
|
19
|
+
extra_rdoc_files:
|
28
20
|
- LICENSE.txt
|
29
|
-
files:
|
21
|
+
files:
|
30
22
|
- LICENSE.txt
|
31
23
|
- README.markdown
|
32
24
|
- lib/encrypted_cookie_store.rb
|
33
25
|
- encrypted_cookie_store-instructure.gemspec
|
34
26
|
homepage: http://github.com/ccutrer/encrypted_cookie_store
|
35
27
|
licenses: []
|
36
|
-
|
37
28
|
post_install_message:
|
38
29
|
rdoc_options: []
|
39
|
-
|
40
|
-
require_paths:
|
30
|
+
require_paths:
|
41
31
|
- lib
|
42
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
33
|
none: false
|
44
|
-
requirements:
|
45
|
-
- -
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
|
48
|
-
|
49
|
-
- 0
|
50
|
-
version: "0"
|
51
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
39
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
segments:
|
58
|
-
- 0
|
59
|
-
version: "0"
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
60
44
|
requirements: []
|
61
|
-
|
62
45
|
rubyforge_project:
|
63
|
-
rubygems_version: 1.8.
|
46
|
+
rubygems_version: 1.8.23
|
64
47
|
signing_key:
|
65
48
|
specification_version: 3
|
66
49
|
summary: EncryptedCookieStore for Ruby on Rails 2.3
|
67
50
|
test_files: []
|
68
|
-
|
69
51
|
has_rdoc:
|