devise-secure_password 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +23 -216
- data/README.md +3 -2
- data/devise-secure_password-1.0.0.gem +0 -0
- data/lib/devise/secure_password/models/password_disallows_frequent_changes.rb +1 -1
- data/lib/devise/secure_password/models/password_disallows_frequent_reuse.rb +2 -1
- data/lib/devise/secure_password/models/password_has_required_content.rb +2 -2
- data/lib/devise/secure_password/version.rb +1 -1
- metadata +4 -5
- data/pkg/devise-secure_password-1.0.0.gem +0 -0
- data/pkg/devise-secure_password-1.0.1.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4418ca0d39c77406b7c40fd212e7ea9d9350161e
|
4
|
+
data.tar.gz: 790c1e7930482d7360db0c30e5d8843ffcd379c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ad7c9e4ea88d6973aeabc5120fbd0132f1a724218a1de433f7d32b746af9d19c8be0022ad51833b7e2dbca657ba87bc07fd8e975e50f636148747baf1f1c580
|
7
|
+
data.tar.gz: 570c5ed613307d3c26c242cc1f674913f81dc40ac0c3e7610210f8fa6d7e168e673f70dd3d08505e4d80ef62d8aa57058320723d4392f262b982761c2ab10e25
|
data/Gemfile.lock
CHANGED
@@ -1,280 +1,87 @@
|
|
1
|
-
GIT
|
2
|
-
remote: https://github.com/thoughtbot/shoulda-matchers.git
|
3
|
-
revision: 4b160bd19ecca7f97d7ac22dccd5fde9b0da5a9f
|
4
|
-
branch: rails-5
|
5
|
-
specs:
|
6
|
-
shoulda-matchers (3.1.2)
|
7
|
-
activesupport (>= 4.2.0)
|
8
|
-
|
9
1
|
PATH
|
10
2
|
remote: .
|
11
3
|
specs:
|
12
|
-
devise-secure_password (
|
4
|
+
devise-secure_password (0.9.4)
|
13
5
|
devise (>= 4.0.0, < 5.0.0)
|
14
6
|
railties (>= 5.0.0, < 6.0.0)
|
15
7
|
|
16
8
|
GEM
|
17
9
|
remote: https://rubygems.org/
|
18
10
|
specs:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
websocket-driver (~> 0.6.1)
|
23
|
-
actionmailer (5.1.5)
|
24
|
-
actionpack (= 5.1.5)
|
25
|
-
actionview (= 5.1.5)
|
26
|
-
activejob (= 5.1.5)
|
27
|
-
mail (~> 2.5, >= 2.5.4)
|
28
|
-
rails-dom-testing (~> 2.0)
|
29
|
-
actionpack (5.1.5)
|
30
|
-
actionview (= 5.1.5)
|
31
|
-
activesupport (= 5.1.5)
|
11
|
+
actionpack (5.1.4)
|
12
|
+
actionview (= 5.1.4)
|
13
|
+
activesupport (= 5.1.4)
|
32
14
|
rack (~> 2.0)
|
33
15
|
rack-test (>= 0.6.3)
|
34
16
|
rails-dom-testing (~> 2.0)
|
35
17
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
36
|
-
actionview (5.1.
|
37
|
-
activesupport (= 5.1.
|
18
|
+
actionview (5.1.4)
|
19
|
+
activesupport (= 5.1.4)
|
38
20
|
builder (~> 3.1)
|
39
21
|
erubi (~> 1.4)
|
40
22
|
rails-dom-testing (~> 2.0)
|
41
23
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
42
|
-
|
43
|
-
activesupport (= 5.1.5)
|
44
|
-
globalid (>= 0.3.6)
|
45
|
-
activemodel (5.1.5)
|
46
|
-
activesupport (= 5.1.5)
|
47
|
-
activerecord (5.1.5)
|
48
|
-
activemodel (= 5.1.5)
|
49
|
-
activesupport (= 5.1.5)
|
50
|
-
arel (~> 8.0)
|
51
|
-
activesupport (5.1.5)
|
24
|
+
activesupport (5.1.4)
|
52
25
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
53
26
|
i18n (~> 0.7)
|
54
27
|
minitest (~> 5.1)
|
55
28
|
tzinfo (~> 1.1)
|
56
|
-
addressable (2.5.2)
|
57
|
-
public_suffix (>= 2.0.2, < 4.0)
|
58
|
-
ansi (1.5.0)
|
59
|
-
arel (8.0.0)
|
60
|
-
ast (2.4.0)
|
61
29
|
bcrypt (3.1.11)
|
62
30
|
builder (3.2.3)
|
63
|
-
capybara (2.18.0)
|
64
|
-
addressable
|
65
|
-
mini_mime (>= 0.1.3)
|
66
|
-
nokogiri (>= 1.3.3)
|
67
|
-
rack (>= 1.0.0)
|
68
|
-
rack-test (>= 0.5.4)
|
69
|
-
xpath (>= 2.0, < 4.0)
|
70
|
-
capybara-screenshot (1.0.18)
|
71
|
-
capybara (>= 1.0, < 3)
|
72
|
-
launchy
|
73
|
-
childprocess (0.8.0)
|
74
|
-
ffi (~> 1.0, >= 1.0.11)
|
75
|
-
coffee-rails (4.2.2)
|
76
|
-
coffee-script (>= 2.2.0)
|
77
|
-
railties (>= 4.0.0)
|
78
|
-
coffee-script (2.4.1)
|
79
|
-
coffee-script-source
|
80
|
-
execjs
|
81
|
-
coffee-script-source (1.12.2)
|
82
31
|
concurrent-ruby (1.0.5)
|
83
32
|
crass (1.0.3)
|
84
|
-
|
85
|
-
devise (4.4.1)
|
33
|
+
devise (4.4.0)
|
86
34
|
bcrypt (~> 3.0)
|
87
35
|
orm_adapter (~> 0.1)
|
88
36
|
railties (>= 4.1.0, < 5.2)
|
89
37
|
responders
|
90
38
|
warden (~> 1.2.3)
|
91
|
-
|
92
|
-
|
93
|
-
erubi (1.7.1)
|
94
|
-
erubis (2.7.0)
|
95
|
-
execjs (2.7.0)
|
96
|
-
ffi (1.9.23)
|
97
|
-
flay (2.10.0)
|
98
|
-
erubis (~> 2.7.0)
|
99
|
-
path_expander (~> 1.0)
|
100
|
-
ruby_parser (~> 3.0)
|
101
|
-
sexp_processor (~> 4.0)
|
102
|
-
globalid (0.4.1)
|
103
|
-
activesupport (>= 4.2.0)
|
104
|
-
hirb (0.7.3)
|
105
|
-
i18n (0.9.5)
|
39
|
+
erubi (1.7.0)
|
40
|
+
i18n (0.9.1)
|
106
41
|
concurrent-ruby (~> 1.0)
|
107
|
-
|
108
|
-
launchy (2.4.3)
|
109
|
-
addressable (~> 2.3)
|
110
|
-
libv8 (3.16.14.19)
|
111
|
-
loofah (2.2.0)
|
42
|
+
loofah (2.1.1)
|
112
43
|
crass (~> 1.0.2)
|
113
44
|
nokogiri (>= 1.5.9)
|
114
|
-
mail (2.7.0)
|
115
|
-
mini_mime (>= 0.1.1)
|
116
45
|
method_source (0.9.0)
|
117
|
-
mini_mime (1.0.0)
|
118
46
|
mini_portile2 (2.3.0)
|
119
|
-
minitest (5.11.
|
120
|
-
|
121
|
-
nokogiri (1.8.2)
|
47
|
+
minitest (5.11.1)
|
48
|
+
nokogiri (1.8.1)
|
122
49
|
mini_portile2 (~> 2.3.0)
|
123
50
|
orm_adapter (0.5.0)
|
124
|
-
|
125
|
-
|
126
|
-
ast (~> 2.4.0)
|
127
|
-
path_expander (1.0.2)
|
128
|
-
powerpack (0.1.1)
|
129
|
-
public_suffix (3.0.2)
|
130
|
-
rack (2.0.4)
|
131
|
-
rack-test (0.8.3)
|
51
|
+
rack (2.0.3)
|
52
|
+
rack-test (0.8.2)
|
132
53
|
rack (>= 1.0, < 3)
|
133
|
-
rails (5.1.5)
|
134
|
-
actioncable (= 5.1.5)
|
135
|
-
actionmailer (= 5.1.5)
|
136
|
-
actionpack (= 5.1.5)
|
137
|
-
actionview (= 5.1.5)
|
138
|
-
activejob (= 5.1.5)
|
139
|
-
activemodel (= 5.1.5)
|
140
|
-
activerecord (= 5.1.5)
|
141
|
-
activesupport (= 5.1.5)
|
142
|
-
bundler (>= 1.3.0)
|
143
|
-
railties (= 5.1.5)
|
144
|
-
sprockets-rails (>= 2.0.0)
|
145
54
|
rails-dom-testing (2.0.3)
|
146
55
|
activesupport (>= 4.2.0)
|
147
56
|
nokogiri (>= 1.6)
|
148
57
|
rails-html-sanitizer (1.0.3)
|
149
58
|
loofah (~> 2.0)
|
150
|
-
railties (5.1.
|
151
|
-
actionpack (= 5.1.
|
152
|
-
activesupport (= 5.1.
|
59
|
+
railties (5.1.4)
|
60
|
+
actionpack (= 5.1.4)
|
61
|
+
activesupport (= 5.1.4)
|
153
62
|
method_source
|
154
63
|
rake (>= 0.8.7)
|
155
64
|
thor (>= 0.18.1, < 2.0)
|
156
|
-
rainbow (3.0.0)
|
157
65
|
rake (12.3.0)
|
158
|
-
rb-fsevent (0.10.3)
|
159
|
-
rb-inotify (0.9.10)
|
160
|
-
ffi (>= 0.5.0, < 2)
|
161
|
-
ref (2.0.0)
|
162
66
|
responders (2.4.0)
|
163
67
|
actionpack (>= 4.2.0, < 5.3)
|
164
68
|
railties (>= 4.2.0, < 5.3)
|
165
|
-
rspec (3.7.0)
|
166
|
-
rspec-core (~> 3.7.0)
|
167
|
-
rspec-expectations (~> 3.7.0)
|
168
|
-
rspec-mocks (~> 3.7.0)
|
169
|
-
rspec-core (3.7.1)
|
170
|
-
rspec-support (~> 3.7.0)
|
171
|
-
rspec-expectations (3.7.0)
|
172
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
173
|
-
rspec-support (~> 3.7.0)
|
174
|
-
rspec-mocks (3.7.0)
|
175
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
176
|
-
rspec-support (~> 3.7.0)
|
177
|
-
rspec-rails (3.7.2)
|
178
|
-
actionpack (>= 3.0)
|
179
|
-
activesupport (>= 3.0)
|
180
|
-
railties (>= 3.0)
|
181
|
-
rspec-core (~> 3.7.0)
|
182
|
-
rspec-expectations (~> 3.7.0)
|
183
|
-
rspec-mocks (~> 3.7.0)
|
184
|
-
rspec-support (~> 3.7.0)
|
185
|
-
rspec-support (3.7.1)
|
186
|
-
rspec_junit_formatter (0.3.0)
|
187
|
-
rspec-core (>= 2, < 4, != 2.12.0)
|
188
|
-
rubocop (0.53.0)
|
189
|
-
parallel (~> 1.10)
|
190
|
-
parser (>= 2.5)
|
191
|
-
powerpack (~> 0.1)
|
192
|
-
rainbow (>= 2.2.2, < 4.0)
|
193
|
-
ruby-progressbar (~> 1.7)
|
194
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
195
|
-
ruby-progressbar (1.9.0)
|
196
|
-
ruby2ruby (2.4.1)
|
197
|
-
ruby_parser (~> 3.1)
|
198
|
-
sexp_processor (~> 4.6)
|
199
|
-
ruby_parser (3.11.0)
|
200
|
-
sexp_processor (~> 4.9)
|
201
|
-
rubyzip (1.2.1)
|
202
|
-
sass (3.5.5)
|
203
|
-
sass-listen (~> 4.0.0)
|
204
|
-
sass-listen (4.0.0)
|
205
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
206
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
207
|
-
sass-rails (5.0.7)
|
208
|
-
railties (>= 4.0.0, < 6)
|
209
|
-
sass (~> 3.1)
|
210
|
-
sprockets (>= 2.8, < 4.0)
|
211
|
-
sprockets-rails (>= 2.0, < 4.0)
|
212
|
-
tilt (>= 1.1, < 3)
|
213
|
-
selenium-webdriver (3.10.0)
|
214
|
-
childprocess (~> 0.5)
|
215
|
-
rubyzip (~> 1.2)
|
216
|
-
sexp_processor (4.10.1)
|
217
|
-
simplecov (0.15.1)
|
218
|
-
docile (~> 1.1.0)
|
219
|
-
json (>= 1.8, < 3)
|
220
|
-
simplecov-html (~> 0.10.0)
|
221
|
-
simplecov-console (0.4.2)
|
222
|
-
ansi
|
223
|
-
hirb
|
224
|
-
simplecov
|
225
|
-
simplecov-html (0.10.2)
|
226
|
-
sprockets (3.7.1)
|
227
|
-
concurrent-ruby (~> 1.0)
|
228
|
-
rack (> 1, < 3)
|
229
|
-
sprockets-rails (3.2.1)
|
230
|
-
actionpack (>= 4.0)
|
231
|
-
activesupport (>= 4.0)
|
232
|
-
sprockets (>= 3.0.0)
|
233
|
-
sqlite3 (1.3.13)
|
234
|
-
therubyracer (0.12.3)
|
235
|
-
libv8 (~> 3.16.14.15)
|
236
|
-
ref
|
237
69
|
thor (0.20.0)
|
238
70
|
thread_safe (0.3.6)
|
239
|
-
|
240
|
-
tzinfo (1.2.5)
|
71
|
+
tzinfo (1.2.4)
|
241
72
|
thread_safe (~> 0.1)
|
242
|
-
unicode-display_width (1.3.0)
|
243
73
|
warden (1.2.7)
|
244
74
|
rack (>= 1.0)
|
245
|
-
|
246
|
-
websocket-extensions (>= 0.1.0)
|
247
|
-
websocket-extensions (0.1.3)
|
248
|
-
xpath (3.0.0)
|
249
|
-
nokogiri (~> 1.8)
|
75
|
+
yard (0.9.12)
|
250
76
|
|
251
77
|
PLATFORMS
|
252
78
|
ruby
|
253
79
|
|
254
80
|
DEPENDENCIES
|
255
|
-
bundler (~> 1.16
|
256
|
-
capybara (~> 2.16, >= 2.16.1)
|
257
|
-
capybara-screenshot (~> 1.0, >= 1.0.18)
|
258
|
-
coffee-rails (~> 4.2)
|
259
|
-
database_cleaner (~> 1.6, >= 1.6.2)
|
260
|
-
devise (~> 4.0)
|
81
|
+
bundler (~> 1.16.1)
|
261
82
|
devise-secure_password!
|
262
|
-
|
263
|
-
|
264
|
-
rails (~> 5.1, >= 5.1.4)
|
265
|
-
rake (~> 12.3)
|
266
|
-
rspec (~> 3.7)
|
267
|
-
rspec-rails (~> 3.7)
|
268
|
-
rspec_junit_formatter (~> 0.3)
|
269
|
-
rubocop (>= 0.49.0)
|
270
|
-
ruby2ruby (~> 2.4, >= 2.4.0)
|
271
|
-
sass-rails (~> 5.0)
|
272
|
-
selenium-webdriver (~> 3.7, >= 3.7.0)
|
273
|
-
shoulda-matchers!
|
274
|
-
simplecov (~> 0.15.1)
|
275
|
-
simplecov-console (~> 0.4.2)
|
276
|
-
sqlite3 (~> 1.3, >= 1.3.13)
|
277
|
-
therubyracer (~> 0.12.3)
|
83
|
+
rake (~> 12.0)
|
84
|
+
yard
|
278
85
|
|
279
86
|
BUNDLED WITH
|
280
87
|
1.16.1
|
data/README.md
CHANGED
@@ -147,7 +147,8 @@ The following database migration needs to be applied:
|
|
147
147
|
prompt> rails generate migration create_previous_passwords salt:string encrypted_password:string user:references
|
148
148
|
```
|
149
149
|
|
150
|
-
Edit the resulting file to disallow null values for the hash
|
150
|
+
Edit the resulting file to disallow null values for the hash,add indexes for both hash and user_id fields, and to also
|
151
|
+
add the timestamp (created_at, updated_at) fields:
|
151
152
|
|
152
153
|
```ruby
|
153
154
|
class CreatePreviousPasswords < ActiveRecord::Migration[5.1]
|
@@ -194,7 +195,7 @@ prompt> bundle exec rake
|
|
194
195
|
To determine the Ruby on Rails versions supported by this release, run the following commands:
|
195
196
|
|
196
197
|
```bash
|
197
|
-
prompt> gem install flay ruby2ruby
|
198
|
+
prompt> gem install flay ruby2ruby rubocop rspec
|
198
199
|
prompt> rake test:spec:targets
|
199
200
|
|
200
201
|
Available Rails targets: 5.0.6, 5.1.4
|
Binary file
|
@@ -7,7 +7,7 @@ module Devise
|
|
7
7
|
|
8
8
|
included do
|
9
9
|
include ActionView::Helpers::DateHelper
|
10
|
-
validate :validate_password_frequent_change
|
10
|
+
validate :validate_password_frequent_change, if: :password_required?
|
11
11
|
|
12
12
|
set_callback(:initialize, :before, :before_resource_initialized)
|
13
13
|
set_callback(:initialize, :after, :after_resource_initialized)
|
@@ -12,7 +12,7 @@ module Devise
|
|
12
12
|
class_name: 'Devise::Models::PreviousPassword',
|
13
13
|
foreign_key: 'user_id',
|
14
14
|
dependent: :destroy
|
15
|
-
validate :validate_password_frequent_reuse
|
15
|
+
validate :validate_password_frequent_reuse, if: :password_required?
|
16
16
|
|
17
17
|
set_callback(:save, :before, :before_resource_saved)
|
18
18
|
set_callback(:save, :after, :after_resource_saved, if: :dirty_password?)
|
@@ -53,6 +53,7 @@ module Devise
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def dirty_password?
|
56
|
+
return false unless password_required?
|
56
57
|
if Rails.version > '5.1'
|
57
58
|
saved_change_to_encrypted_password?
|
58
59
|
else
|
@@ -8,8 +8,8 @@ module Devise
|
|
8
8
|
LENGTH_MAX = 255
|
9
9
|
|
10
10
|
included do
|
11
|
-
validate :validate_password_content
|
12
|
-
validate :validate_password_confirmation_content
|
11
|
+
validate :validate_password_content, if: :password_required?
|
12
|
+
validate :validate_password_confirmation_content, if: :password_required?
|
13
13
|
end
|
14
14
|
|
15
15
|
def validate_password_content
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-secure_password
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Eissler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|
@@ -424,6 +424,7 @@ files:
|
|
424
424
|
- "./bin/console"
|
425
425
|
- "./bin/setup"
|
426
426
|
- "./config/locales/en.yml"
|
427
|
+
- "./devise-secure_password-1.0.0.gem"
|
427
428
|
- "./devise-secure_password.gemspec"
|
428
429
|
- "./docker-entrypoint.sh"
|
429
430
|
- "./gemfiles/rails-5_0_6.gemfile"
|
@@ -443,8 +444,6 @@ files:
|
|
443
444
|
- "./lib/generators/devise/templates/README.txt"
|
444
445
|
- "./lib/generators/devise/templates/secure_password.rb"
|
445
446
|
- "./lib/support/string/character_counter.rb"
|
446
|
-
- "./pkg/devise-secure_password-1.0.0.gem"
|
447
|
-
- "./pkg/devise-secure_password-1.0.1.gem"
|
448
447
|
homepage: https://github.com/valimail/devise-secure_password
|
449
448
|
licenses:
|
450
449
|
- MIT
|
@@ -465,7 +464,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
465
464
|
version: '0'
|
466
465
|
requirements: []
|
467
466
|
rubyforge_project:
|
468
|
-
rubygems_version: 2.
|
467
|
+
rubygems_version: 2.6.14
|
469
468
|
signing_key:
|
470
469
|
specification_version: 4
|
471
470
|
summary: A devise password policy enforcement extension.
|
Binary file
|
Binary file
|