devise_security_extension 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -7,7 +7,7 @@ an security extension for devise
|
|
7
7
|
* expire passwords (update password with current password)
|
8
8
|
* strong password validation
|
9
9
|
* save old passwords for check new passwords
|
10
|
-
* captcha support for sign_up, sign_in, recover
|
10
|
+
* captcha support for sign_up, sign_in, recover and unlock
|
11
11
|
|
12
12
|
== Installation
|
13
13
|
add to Gemfile
|
@@ -45,6 +45,7 @@ for :secure_validatable you need to add
|
|
45
45
|
|
46
46
|
# captcha integration for unlock form
|
47
47
|
# config.captcha_for_unlock = true
|
48
|
+
end
|
48
49
|
|
49
50
|
== Captcha-Support
|
50
51
|
|
@@ -85,6 +86,7 @@ That's all!
|
|
85
86
|
|
86
87
|
* devise (https://github.com/plataformatec/devise)
|
87
88
|
* Rails 3 (http://github.com/rails/rails)
|
89
|
+
* recommendation: autocomplete-off (http://github.com/phatworx/autocomplete-off)
|
88
90
|
|
89
91
|
== Todo
|
90
92
|
|
@@ -94,7 +96,7 @@ That's all!
|
|
94
96
|
* 0.1 expire passwords
|
95
97
|
* 0.2 strong password validation
|
96
98
|
* 0.3 password archivable with validation
|
97
|
-
* 0.4 captcha support for sign_up, sign_in, recover
|
99
|
+
* 0.4 captcha support for sign_up, sign_in, recover and unlock
|
98
100
|
|
99
101
|
== Maintainers
|
100
102
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.2
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{devise_security_extension}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Marco Scholl"]
|
12
|
-
s.date = %q{2011-06-
|
12
|
+
s.date = %q{2011-06-24}
|
13
13
|
s.description = %q{a gem for extend devise for more password security}
|
14
14
|
s.email = %q{team@phatworx.de}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -60,7 +60,7 @@ Gem::Specification.new do |s|
|
|
60
60
|
s.specification_version = 3
|
61
61
|
|
62
62
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
63
|
-
s.add_runtime_dependency(%q<rails>, ["
|
63
|
+
s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
|
64
64
|
s.add_runtime_dependency(%q<devise>, [">= 0"])
|
65
65
|
s.add_development_dependency(%q<rails_email_validator>, [">= 0"])
|
66
66
|
s.add_development_dependency(%q<easy_captcha>, [">= 0"])
|
@@ -68,7 +68,7 @@ Gem::Specification.new do |s|
|
|
68
68
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
69
69
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
70
70
|
else
|
71
|
-
s.add_dependency(%q<rails>, ["
|
71
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
72
72
|
s.add_dependency(%q<devise>, [">= 0"])
|
73
73
|
s.add_dependency(%q<rails_email_validator>, [">= 0"])
|
74
74
|
s.add_dependency(%q<easy_captcha>, [">= 0"])
|
@@ -77,7 +77,7 @@ Gem::Specification.new do |s|
|
|
77
77
|
s.add_dependency(%q<rcov>, [">= 0"])
|
78
78
|
end
|
79
79
|
else
|
80
|
-
s.add_dependency(%q<rails>, ["
|
80
|
+
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
81
81
|
s.add_dependency(%q<devise>, [">= 0"])
|
82
82
|
s.add_dependency(%q<rails_email_validator>, [">= 0"])
|
83
83
|
s.add_dependency(%q<easy_captcha>, [">= 0"])
|
@@ -35,7 +35,7 @@ module Devise # :nodoc:
|
|
35
35
|
self.old_passwords.order('created_at DESC').limit(self.class.deny_old_passwords).limit(self.class.deny_old_passwords).each do |old_password|
|
36
36
|
dummy = self.class.new
|
37
37
|
dummy.encrypted_password = old_password.encrypted_password
|
38
|
-
dummy.password_salt = old_password.password_salt
|
38
|
+
dummy.password_salt = old_password.password_salt if dummy.respond_to?(:password_salt)
|
39
39
|
return true if dummy.valid_password?(self.password)
|
40
40
|
end
|
41
41
|
end
|
@@ -49,10 +49,10 @@ module Devise # :nodoc:
|
|
49
49
|
def archive_password
|
50
50
|
if self.encrypted_password_changed?
|
51
51
|
if self.class.password_archiving_count.to_i > 0
|
52
|
-
if self.password_salt_change.nil?
|
53
|
-
self.old_passwords.create! :encrypted_password => self.encrypted_password_change.first
|
54
|
-
else
|
52
|
+
if self.respond_to?(:password_salt_change) and not self.password_salt_change.nil?
|
55
53
|
self.old_passwords.create! :encrypted_password => self.encrypted_password_change.first, :password_salt => self.password_salt_change.first
|
54
|
+
else
|
55
|
+
self.old_passwords.create! :encrypted_password => self.encrypted_password_change.first
|
56
56
|
end
|
57
57
|
self.old_passwords.order('created_at DESC').offset(self.class.password_archiving_count).destroy_all
|
58
58
|
else
|
@@ -38,10 +38,10 @@ module Devise
|
|
38
38
|
|
39
39
|
def current_equal_password_validation
|
40
40
|
if not self.new_record? and not self.encrypted_password_change.nil?
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
dummy = self.class.new
|
42
|
+
dummy.encrypted_password = self.encrypted_password_change.first
|
43
|
+
dummy.password_salt = self.password_salt_change.first if self.respond_to? :password_salt_change and not self.password_salt_change.nil?
|
44
|
+
self.errors.add(:password, :equal_to_current_password) if dummy.valid_password?(self.password)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_security_extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,23 +9,23 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-06-
|
12
|
+
date: 2011-06-24 00:00:00.000000000 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
17
|
-
requirement: &
|
17
|
+
requirement: &14765580 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
|
-
- -
|
20
|
+
- - ! '>='
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 3.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *14765580
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: devise
|
28
|
-
requirement: &
|
28
|
+
requirement: &14764460 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *14764460
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: rails_email_validator
|
39
|
-
requirement: &
|
39
|
+
requirement: &14763380 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *14763380
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: easy_captcha
|
50
|
-
requirement: &
|
50
|
+
requirement: &14762340 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *14762340
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: bundler
|
61
|
-
requirement: &
|
61
|
+
requirement: &14760280 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ~>
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: 1.0.0
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *14760280
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: jeweler
|
72
|
-
requirement: &
|
72
|
+
requirement: &14758080 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: 1.5.2
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *14758080
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rcov
|
83
|
-
requirement: &
|
83
|
+
requirement: &14757260 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,7 +88,7 @@ dependencies:
|
|
88
88
|
version: '0'
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *14757260
|
92
92
|
description: a gem for extend devise for more password security
|
93
93
|
email: team@phatworx.de
|
94
94
|
executables: []
|
@@ -141,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
141
|
version: '0'
|
142
142
|
segments:
|
143
143
|
- 0
|
144
|
-
hash:
|
144
|
+
hash: 60670938341967987
|
145
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
146
|
none: false
|
147
147
|
requirements:
|