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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb03df255a2bcf40880744f8ae366b887b551a9537744494c478ca845de8aff5
4
- data.tar.gz: 3259c21a917eb9d09745807d4b0049cefd6428c12cc8aa5826493a01228f3902
3
+ metadata.gz: 2e4f7ed0e917892a978b87d88b3ed57ef0e2c931121f3a45da37dba7be0f0907
4
+ data.tar.gz: b20c0f964a4f9ddc7695b76c8bc608b06bf7aa5eb5127abff8c81c2e2aa68386
5
5
  SHA512:
6
- metadata.gz: a81f5b0019ee72ab4917b7dbe4b1c64b58dd7c96524463fe0273d11d5ad5adb44e17abcfc2915104a229abb296215155333241e0f05da0530ba114745eb08aa6
7
- data.tar.gz: 7cfe391c6567fa58a76b7951905ddb94b8b86c24561817e02e7739984e9a95bf1ed6189e57f2ee3a81ba6361b6ae9fa633d393cc618e4b3321334eec816cd548
6
+ metadata.gz: 0b79dce92c2c6bc7465eed78dee533eaf3ca9569a0b041e8681e53bc46a239b922a3dc86470b55d61cd4f55c0fd1f28dbdf674f5ba4f6764690371516f044f95
7
+ data.tar.gz: cf229b496e85607701adbed264ca9c8db098da0a5cda247ace80960b4c58a239e37b3e6a997660a1ad9b8fdbca97c3b5fa9979353994fcdeaa3a6c73d3cc67e9
@@ -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
 
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Utopia
22
- VERSION = "2.5.1"
22
+ VERSION = "2.5.3"
23
23
  end
data/setup/site/config.ru CHANGED
@@ -16,10 +16,6 @@ else
16
16
  use Utopia::Static, root: 'public'
17
17
  end
18
18
 
19
- use Rack::Sendfile
20
-
21
- use Utopia::ContentLength
22
-
23
19
  use Utopia::Redirection::Rewrite,
24
20
  '/' => '/welcome/index'
25
21
 
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.1
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-18 00:00:00.000000000 Z
11
+ date: 2018-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trenni