authlogic 3.4.4 → 3.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +14 -1
- data/authlogic.gemspec +1 -1
- data/lib/authlogic/acts_as_authentic/perishable_token.rb +1 -1
- data/lib/authlogic/session/cookies.rb +2 -2
- data/test/session_test/cookies_test.rb +8 -0
- data/test/test_helper.rb +4 -4
- metadata +37 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: 8bffb67255fc9ec159c102e5a1fb08da08ccac95
|
4
|
+
data.tar.gz: c02b665debaece73cfe56a98779189f9020e014b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b31555535c3e0b37dca55ae8ed02dd38d2879793174c30c26c4047a7bbf9b4750c3b7a97b442db88608c1f60ba0d3f07de406f101a2ba6d05d96fcea7292763c
|
7
|
+
data.tar.gz: bc1bf62ba62ee81894742526f3993957421592663f30736da7681781ea663f01f582cf3b831da908e597f606f04c18aa003b0f501417d35e889194e82fa580a0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 3.4.5 2015-03-01
|
4
|
+
|
5
|
+
* changes
|
6
|
+
* security-hardening fix and cleanup in persistence_token lookup
|
7
|
+
* security-hardening fix in perishable_token lookup (thx @tomekr)
|
8
|
+
|
9
|
+
## 3.4.4 2014-12-23
|
10
|
+
|
11
|
+
* changes
|
12
|
+
* extract rw_config into an Authlogic::Config module
|
13
|
+
* improved the way config changes are made in tests
|
14
|
+
* fix for Rails 4.2 by extending ActiveModel
|
15
|
+
|
3
16
|
## 3.4.3 2014-10-08
|
4
17
|
|
5
18
|
* changes
|
@@ -30,7 +43,7 @@
|
|
30
43
|
* added request store for better concurency for threaded environments
|
31
44
|
|
32
45
|
* changes
|
33
|
-
* made scrypt the default crypto provider from SHA512
|
46
|
+
* BREAKING CHANGE: made scrypt the default crypto provider from SHA512 (https://github.com/binarylogic/authlogic#upgrading-to-authlogic-340)
|
34
47
|
* ditched appraisal
|
35
48
|
* officially support rails 4 (still supporting rails 3)
|
36
49
|
* improved find_with_case default performance
|
data/authlogic.gemspec
CHANGED
@@ -190,8 +190,8 @@ module Authlogic
|
|
190
190
|
# Tries to validate the session from information in the cookie
|
191
191
|
def persist_by_cookie
|
192
192
|
persistence_token, record_id = cookie_credentials
|
193
|
-
if
|
194
|
-
record =
|
193
|
+
if persistence_token.present?
|
194
|
+
record = search_for_record("find_by_#{klass.primary_key}", record_id)
|
195
195
|
self.unauthorized_record = record if record && record.persistence_token == persistence_token
|
196
196
|
valid?
|
197
197
|
else
|
@@ -128,6 +128,14 @@ module SessionTest
|
|
128
128
|
assert_equal ben, session.record
|
129
129
|
end
|
130
130
|
|
131
|
+
def test_persist_persist_by_cookie_with_blank_persistence_token
|
132
|
+
ben = users(:ben)
|
133
|
+
ben.update_column(:persistence_token, "")
|
134
|
+
assert !UserSession.find
|
135
|
+
set_cookie_for(ben)
|
136
|
+
assert !UserSession.find
|
137
|
+
end
|
138
|
+
|
131
139
|
def test_remember_me_expired
|
132
140
|
ben = users(:ben)
|
133
141
|
session = UserSession.new(ben)
|
data/test/test_helper.rb
CHANGED
@@ -163,15 +163,15 @@ class ActiveSupport::TestCase
|
|
163
163
|
controller.http_user = controller.http_password = controller.realm = nil
|
164
164
|
end
|
165
165
|
|
166
|
-
def set_cookie_for(user
|
167
|
-
controller.cookies["user_credentials"] = {:value => user.persistence_token, :expires => nil}
|
166
|
+
def set_cookie_for(user)
|
167
|
+
controller.cookies["user_credentials"] = {:value => "#{user.persistence_token}::#{user.id}", :expires => nil}
|
168
168
|
end
|
169
169
|
|
170
170
|
def unset_cookie
|
171
171
|
controller.cookies["user_credentials"] = nil
|
172
172
|
end
|
173
173
|
|
174
|
-
def set_params_for(user
|
174
|
+
def set_params_for(user)
|
175
175
|
controller.params["user_credentials"] = user.single_access_token
|
176
176
|
end
|
177
177
|
|
@@ -187,7 +187,7 @@ class ActiveSupport::TestCase
|
|
187
187
|
controller.request_content_type = nil
|
188
188
|
end
|
189
189
|
|
190
|
-
def set_session_for(user
|
190
|
+
def set_session_for(user)
|
191
191
|
controller.session["user_credentials"] = user.persistence_token
|
192
192
|
controller.session["user_credentials_id"] = user.id
|
193
193
|
end
|
metadata
CHANGED
@@ -1,99 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authlogic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Johnson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
|
-
version_requirements: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '3.2'
|
20
15
|
requirement: !ruby/object:Gem::Requirement
|
21
16
|
requirements:
|
22
|
-
- - '>='
|
17
|
+
- - ! '>='
|
23
18
|
- !ruby/object:Gem::Version
|
24
19
|
version: '3.2'
|
25
|
-
prerelease: false
|
26
20
|
type: :runtime
|
27
|
-
|
28
|
-
name: activesupport
|
21
|
+
prerelease: false
|
29
22
|
version_requirements: !ruby/object:Gem::Requirement
|
30
23
|
requirements:
|
31
|
-
- - '>='
|
24
|
+
- - ! '>='
|
32
25
|
- !ruby/object:Gem::Version
|
33
26
|
version: '3.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
34
29
|
requirement: !ruby/object:Gem::Requirement
|
35
30
|
requirements:
|
36
|
-
- - '>='
|
31
|
+
- - ! '>='
|
37
32
|
- !ruby/object:Gem::Version
|
38
33
|
version: '3.2'
|
39
|
-
prerelease: false
|
40
34
|
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: request_store
|
43
|
-
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.0'
|
48
|
-
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
49
51
|
requirements:
|
50
52
|
- - ~>
|
51
53
|
- !ruby/object:Gem::Version
|
52
54
|
version: '1.0'
|
53
|
-
prerelease: false
|
54
|
-
type: :runtime
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: scrypt
|
57
|
-
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.2'
|
62
|
-
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
65
|
requirements:
|
64
66
|
- - ~>
|
65
67
|
- !ruby/object:Gem::Version
|
66
68
|
version: '1.2'
|
67
|
-
prerelease: false
|
68
|
-
type: :runtime
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bcrypt
|
71
|
-
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '3.1'
|
76
|
-
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
79
|
requirements:
|
78
80
|
- - ~>
|
79
81
|
- !ruby/object:Gem::Version
|
80
82
|
version: '3.1'
|
81
|
-
prerelease: false
|
82
|
-
type: :development
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: timecop
|
85
|
-
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0.7'
|
90
|
-
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
93
|
requirements:
|
92
94
|
- - ~>
|
93
95
|
- !ruby/object:Gem::Version
|
94
96
|
version: '0.7'
|
95
|
-
prerelease: false
|
96
|
-
type: :development
|
97
97
|
description: A clean, simple, and unobtrusive ruby authentication solution.
|
98
98
|
email:
|
99
99
|
- bjohnson@binarylogic.com
|
@@ -237,24 +237,24 @@ homepage: http://github.com/binarylogic/authlogic
|
|
237
237
|
licenses:
|
238
238
|
- MIT
|
239
239
|
metadata: {}
|
240
|
-
post_install_message:
|
240
|
+
post_install_message:
|
241
241
|
rdoc_options: []
|
242
242
|
require_paths:
|
243
243
|
- lib
|
244
244
|
required_ruby_version: !ruby/object:Gem::Requirement
|
245
245
|
requirements:
|
246
|
-
- - '>='
|
246
|
+
- - ! '>='
|
247
247
|
- !ruby/object:Gem::Version
|
248
248
|
version: '0'
|
249
249
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
250
250
|
requirements:
|
251
|
-
- - '>='
|
251
|
+
- - ! '>='
|
252
252
|
- !ruby/object:Gem::Version
|
253
253
|
version: '0'
|
254
254
|
requirements: []
|
255
|
-
rubyforge_project:
|
256
|
-
rubygems_version: 2.
|
257
|
-
signing_key:
|
255
|
+
rubyforge_project:
|
256
|
+
rubygems_version: 2.2.2
|
257
|
+
signing_key:
|
258
258
|
specification_version: 4
|
259
259
|
summary: A clean, simple, and unobtrusive ruby authentication solution.
|
260
260
|
test_files:
|