utopia 2.5.1 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/utopia/session.rb +8 -4
- data/lib/utopia/version.rb +1 -1
- data/setup/site/config.ru +0 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e4f7ed0e917892a978b87d88b3ed57ef0e2c931121f3a45da37dba7be0f0907
|
4
|
+
data.tar.gz: b20c0f964a4f9ddc7695b76c8bc608b06bf7aa5eb5127abff8c81c2e2aa68386
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b79dce92c2c6bc7465eed78dee533eaf3ca9569a0b041e8681e53bc46a239b922a3dc86470b55d61cd4f55c0fd1f28dbdf674f5ba4f6764690371516f044f95
|
7
|
+
data.tar.gz: cf229b496e85607701adbed264ca9c8db098da0a5cda247ace80960b4c58a239e37b3e6a997660a1ad9b8fdbca97c3b5fa9979353994fcdeaa3a6c73d3cc67e9
|
data/lib/utopia/session.rb
CHANGED
@@ -111,7 +111,7 @@ module Utopia
|
|
111
111
|
if session_hash.needs_update?(@update_timeout)
|
112
112
|
values = session_hash.values
|
113
113
|
|
114
|
-
values[:updated_at] = Time.now
|
114
|
+
values[:updated_at] = Time.now.utc
|
115
115
|
|
116
116
|
data = encrypt(session_hash.values)
|
117
117
|
|
@@ -124,8 +124,8 @@ module Utopia
|
|
124
124
|
{
|
125
125
|
request_ip: request.ip,
|
126
126
|
request_user_agent: request.user_agent,
|
127
|
-
created_at: Time.now,
|
128
|
-
updated_at: Time.now,
|
127
|
+
created_at: Time.now.utc,
|
128
|
+
updated_at: Time.now.utc,
|
129
129
|
}
|
130
130
|
end
|
131
131
|
|
@@ -147,10 +147,14 @@ module Utopia
|
|
147
147
|
|
148
148
|
def valid_session?(request, values)
|
149
149
|
if values[:request_ip] != request.ip
|
150
|
+
warn "Invalid session because #{values[:request_ip]} doesn't match #{request.ip}!"
|
151
|
+
|
150
152
|
return false
|
151
153
|
end
|
152
154
|
|
153
155
|
if values[:request_user_agent] != request.user_agent
|
156
|
+
warn "Invalid session because #{values[:request_user_agent]} doesn't match #{request.user_agent}!"
|
157
|
+
|
154
158
|
return false
|
155
159
|
end
|
156
160
|
|
@@ -159,7 +163,7 @@ module Utopia
|
|
159
163
|
|
160
164
|
def expires
|
161
165
|
if @expires_after
|
162
|
-
return Time.now + @expires_after
|
166
|
+
return Time.now.utc + @expires_after
|
163
167
|
end
|
164
168
|
end
|
165
169
|
|
data/lib/utopia/version.rb
CHANGED
data/setup/site/config.ru
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utopia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trenni
|