devise-secure_password 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +6 -0
- data/Gemfile.lock +8 -8
- data/README.md +2 -2
- data/app/controllers/devise/passwords_with_policy_controller.rb +2 -4
- data/gemfiles/{rails-5_0_6.gemfile → rails-5_0.gemfile} +1 -1
- data/gemfiles/{rails-5_1_4.gemfile → rails-5_1.gemfile} +1 -1
- data/gemfiles/{rails-5_1_4.gemfile.lock → rails-5_1.gemfile.lock} +8 -8
- data/lib/devise/secure_password.rb +2 -2
- data/lib/devise/secure_password/controllers/devise_helpers.rb +4 -48
- data/lib/devise/secure_password/controllers/helpers.rb +53 -0
- data/lib/devise/secure_password/models/password_requires_regular_updates.rb +0 -2
- data/lib/devise/secure_password/version.rb +1 -1
- data/pkg/devise-secure_password-1.0.7.gem +0 -0
- metadata +8 -38
- data/coverage/assets/0.10.2/application.css +0 -799
- data/coverage/assets/0.10.2/application.js +0 -1707
- data/coverage/assets/0.10.2/colorbox/border.png +0 -0
- data/coverage/assets/0.10.2/colorbox/controls.png +0 -0
- data/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
- data/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.10.2/favicon_green.png +0 -0
- data/coverage/assets/0.10.2/favicon_red.png +0 -0
- data/coverage/assets/0.10.2/favicon_yellow.png +0 -0
- data/coverage/assets/0.10.2/loading.gif +0 -0
- data/coverage/assets/0.10.2/magnify.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/index.html +0 -4115
- data/devise-secure_password-1.0.0.gem +0 -0
- data/gemfiles/rails-5_0_6.gemfile.lock +0 -286
- data/lib/devise/secure_password/controllers/active_helpers.rb +0 -45
- data/lib/devise/secure_password/hooks/password_requires_regular_updates.rb +0 -5
- data/pkg/devise-secure_password-1.0.3.gem +0 -0
- data/pkg/devise-secure_password-1.0.4.gem +0 -0
- data/pkg/devise-secure_password-1.0.5.gem +0 -0
Binary file
|
@@ -1,286 +0,0 @@
|
|
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
|
-
PATH
|
10
|
-
remote: ..
|
11
|
-
specs:
|
12
|
-
devise-secure_password (1.0.6)
|
13
|
-
devise (>= 4.0.0, < 5.0.0)
|
14
|
-
railties (>= 5.0.0, < 6.0.0)
|
15
|
-
|
16
|
-
GEM
|
17
|
-
remote: https://rubygems.org/
|
18
|
-
specs:
|
19
|
-
actioncable (5.0.7)
|
20
|
-
actionpack (= 5.0.7)
|
21
|
-
nio4r (>= 1.2, < 3.0)
|
22
|
-
websocket-driver (~> 0.6.1)
|
23
|
-
actionmailer (5.0.7)
|
24
|
-
actionpack (= 5.0.7)
|
25
|
-
actionview (= 5.0.7)
|
26
|
-
activejob (= 5.0.7)
|
27
|
-
mail (~> 2.5, >= 2.5.4)
|
28
|
-
rails-dom-testing (~> 2.0)
|
29
|
-
actionpack (5.0.7)
|
30
|
-
actionview (= 5.0.7)
|
31
|
-
activesupport (= 5.0.7)
|
32
|
-
rack (~> 2.0)
|
33
|
-
rack-test (~> 0.6.3)
|
34
|
-
rails-dom-testing (~> 2.0)
|
35
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
36
|
-
actionview (5.0.7)
|
37
|
-
activesupport (= 5.0.7)
|
38
|
-
builder (~> 3.1)
|
39
|
-
erubis (~> 2.7.0)
|
40
|
-
rails-dom-testing (~> 2.0)
|
41
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
42
|
-
activejob (5.0.7)
|
43
|
-
activesupport (= 5.0.7)
|
44
|
-
globalid (>= 0.3.6)
|
45
|
-
activemodel (5.0.7)
|
46
|
-
activesupport (= 5.0.7)
|
47
|
-
activerecord (5.0.7)
|
48
|
-
activemodel (= 5.0.7)
|
49
|
-
activesupport (= 5.0.7)
|
50
|
-
arel (~> 7.0)
|
51
|
-
activesupport (5.0.7)
|
52
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
53
|
-
i18n (>= 0.7, < 2)
|
54
|
-
minitest (~> 5.1)
|
55
|
-
tzinfo (~> 1.1)
|
56
|
-
addressable (2.5.2)
|
57
|
-
public_suffix (>= 2.0.2, < 4.0)
|
58
|
-
ansi (1.5.0)
|
59
|
-
arel (7.1.4)
|
60
|
-
ast (2.4.0)
|
61
|
-
bcrypt (3.1.11)
|
62
|
-
builder (3.2.3)
|
63
|
-
byebug (10.0.2)
|
64
|
-
capybara (2.18.0)
|
65
|
-
addressable
|
66
|
-
mini_mime (>= 0.1.3)
|
67
|
-
nokogiri (>= 1.3.3)
|
68
|
-
rack (>= 1.0.0)
|
69
|
-
rack-test (>= 0.5.4)
|
70
|
-
xpath (>= 2.0, < 4.0)
|
71
|
-
capybara-screenshot (1.0.19)
|
72
|
-
capybara (>= 1.0, < 4)
|
73
|
-
launchy
|
74
|
-
childprocess (0.9.0)
|
75
|
-
ffi (~> 1.0, >= 1.0.11)
|
76
|
-
coffee-rails (4.2.2)
|
77
|
-
coffee-script (>= 2.2.0)
|
78
|
-
railties (>= 4.0.0)
|
79
|
-
coffee-script (2.4.1)
|
80
|
-
coffee-script-source
|
81
|
-
execjs
|
82
|
-
coffee-script-source (1.12.2)
|
83
|
-
concurrent-ruby (1.0.5)
|
84
|
-
crass (1.0.4)
|
85
|
-
database_cleaner (1.7.0)
|
86
|
-
devise (4.4.3)
|
87
|
-
bcrypt (~> 3.0)
|
88
|
-
orm_adapter (~> 0.1)
|
89
|
-
railties (>= 4.1.0, < 6.0)
|
90
|
-
responders
|
91
|
-
warden (~> 1.2.3)
|
92
|
-
diff-lcs (1.3)
|
93
|
-
docile (1.1.5)
|
94
|
-
erubis (2.7.0)
|
95
|
-
execjs (2.7.0)
|
96
|
-
ffi (1.9.23)
|
97
|
-
flay (2.11.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 (1.0.1)
|
106
|
-
concurrent-ruby (~> 1.0)
|
107
|
-
jquery-rails (4.3.3)
|
108
|
-
rails-dom-testing (>= 1, < 3)
|
109
|
-
railties (>= 4.2.0)
|
110
|
-
thor (>= 0.14, < 2.0)
|
111
|
-
json (2.1.0)
|
112
|
-
launchy (2.4.3)
|
113
|
-
addressable (~> 2.3)
|
114
|
-
libv8 (3.16.14.19)
|
115
|
-
loofah (2.2.2)
|
116
|
-
crass (~> 1.0.2)
|
117
|
-
nokogiri (>= 1.5.9)
|
118
|
-
mail (2.7.0)
|
119
|
-
mini_mime (>= 0.1.1)
|
120
|
-
method_source (0.9.0)
|
121
|
-
mini_mime (1.0.0)
|
122
|
-
mini_portile2 (2.3.0)
|
123
|
-
minitest (5.11.3)
|
124
|
-
nio4r (2.3.0)
|
125
|
-
nokogiri (1.8.2)
|
126
|
-
mini_portile2 (~> 2.3.0)
|
127
|
-
orm_adapter (0.5.0)
|
128
|
-
parallel (1.12.1)
|
129
|
-
parser (2.5.1.0)
|
130
|
-
ast (~> 2.4.0)
|
131
|
-
path_expander (1.0.3)
|
132
|
-
powerpack (0.1.1)
|
133
|
-
public_suffix (3.0.2)
|
134
|
-
rack (2.0.5)
|
135
|
-
rack-test (0.6.3)
|
136
|
-
rack (>= 1.0)
|
137
|
-
rails (5.0.7)
|
138
|
-
actioncable (= 5.0.7)
|
139
|
-
actionmailer (= 5.0.7)
|
140
|
-
actionpack (= 5.0.7)
|
141
|
-
actionview (= 5.0.7)
|
142
|
-
activejob (= 5.0.7)
|
143
|
-
activemodel (= 5.0.7)
|
144
|
-
activerecord (= 5.0.7)
|
145
|
-
activesupport (= 5.0.7)
|
146
|
-
bundler (>= 1.3.0)
|
147
|
-
railties (= 5.0.7)
|
148
|
-
sprockets-rails (>= 2.0.0)
|
149
|
-
rails-dom-testing (2.0.3)
|
150
|
-
activesupport (>= 4.2.0)
|
151
|
-
nokogiri (>= 1.6)
|
152
|
-
rails-html-sanitizer (1.0.4)
|
153
|
-
loofah (~> 2.2, >= 2.2.2)
|
154
|
-
railties (5.0.7)
|
155
|
-
actionpack (= 5.0.7)
|
156
|
-
activesupport (= 5.0.7)
|
157
|
-
method_source
|
158
|
-
rake (>= 0.8.7)
|
159
|
-
thor (>= 0.18.1, < 2.0)
|
160
|
-
rainbow (3.0.0)
|
161
|
-
rake (12.3.1)
|
162
|
-
rb-fsevent (0.10.3)
|
163
|
-
rb-inotify (0.9.10)
|
164
|
-
ffi (>= 0.5.0, < 2)
|
165
|
-
ref (2.0.0)
|
166
|
-
responders (2.4.0)
|
167
|
-
actionpack (>= 4.2.0, < 5.3)
|
168
|
-
railties (>= 4.2.0, < 5.3)
|
169
|
-
rspec (3.7.0)
|
170
|
-
rspec-core (~> 3.7.0)
|
171
|
-
rspec-expectations (~> 3.7.0)
|
172
|
-
rspec-mocks (~> 3.7.0)
|
173
|
-
rspec-core (3.7.1)
|
174
|
-
rspec-support (~> 3.7.0)
|
175
|
-
rspec-expectations (3.7.0)
|
176
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
177
|
-
rspec-support (~> 3.7.0)
|
178
|
-
rspec-mocks (3.7.0)
|
179
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
180
|
-
rspec-support (~> 3.7.0)
|
181
|
-
rspec-rails (3.7.2)
|
182
|
-
actionpack (>= 3.0)
|
183
|
-
activesupport (>= 3.0)
|
184
|
-
railties (>= 3.0)
|
185
|
-
rspec-core (~> 3.7.0)
|
186
|
-
rspec-expectations (~> 3.7.0)
|
187
|
-
rspec-mocks (~> 3.7.0)
|
188
|
-
rspec-support (~> 3.7.0)
|
189
|
-
rspec-support (3.7.1)
|
190
|
-
rspec_junit_formatter (0.3.0)
|
191
|
-
rspec-core (>= 2, < 4, != 2.12.0)
|
192
|
-
rubocop (0.55.0)
|
193
|
-
parallel (~> 1.10)
|
194
|
-
parser (>= 2.5)
|
195
|
-
powerpack (~> 0.1)
|
196
|
-
rainbow (>= 2.2.2, < 4.0)
|
197
|
-
ruby-progressbar (~> 1.7)
|
198
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
199
|
-
ruby-progressbar (1.9.0)
|
200
|
-
ruby2ruby (2.4.1)
|
201
|
-
ruby_parser (~> 3.1)
|
202
|
-
sexp_processor (~> 4.6)
|
203
|
-
ruby_parser (3.11.0)
|
204
|
-
sexp_processor (~> 4.9)
|
205
|
-
rubyzip (1.2.1)
|
206
|
-
sass (3.5.6)
|
207
|
-
sass-listen (~> 4.0.0)
|
208
|
-
sass-listen (4.0.0)
|
209
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
210
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
211
|
-
sass-rails (5.0.7)
|
212
|
-
railties (>= 4.0.0, < 6)
|
213
|
-
sass (~> 3.1)
|
214
|
-
sprockets (>= 2.8, < 4.0)
|
215
|
-
sprockets-rails (>= 2.0, < 4.0)
|
216
|
-
tilt (>= 1.1, < 3)
|
217
|
-
selenium-webdriver (3.11.0)
|
218
|
-
childprocess (~> 0.5)
|
219
|
-
rubyzip (~> 1.2)
|
220
|
-
sexp_processor (4.11.0)
|
221
|
-
simplecov (0.15.1)
|
222
|
-
docile (~> 1.1.0)
|
223
|
-
json (>= 1.8, < 3)
|
224
|
-
simplecov-html (~> 0.10.0)
|
225
|
-
simplecov-console (0.4.2)
|
226
|
-
ansi
|
227
|
-
hirb
|
228
|
-
simplecov
|
229
|
-
simplecov-html (0.10.2)
|
230
|
-
sprockets (3.7.1)
|
231
|
-
concurrent-ruby (~> 1.0)
|
232
|
-
rack (> 1, < 3)
|
233
|
-
sprockets-rails (3.2.1)
|
234
|
-
actionpack (>= 4.0)
|
235
|
-
activesupport (>= 4.0)
|
236
|
-
sprockets (>= 3.0.0)
|
237
|
-
sqlite3 (1.3.13)
|
238
|
-
therubyracer (0.12.3)
|
239
|
-
libv8 (~> 3.16.14.15)
|
240
|
-
ref
|
241
|
-
thor (0.20.0)
|
242
|
-
thread_safe (0.3.6)
|
243
|
-
tilt (2.0.8)
|
244
|
-
tzinfo (1.2.5)
|
245
|
-
thread_safe (~> 0.1)
|
246
|
-
unicode-display_width (1.3.2)
|
247
|
-
warden (1.2.7)
|
248
|
-
rack (>= 1.0)
|
249
|
-
websocket-driver (0.6.5)
|
250
|
-
websocket-extensions (>= 0.1.0)
|
251
|
-
websocket-extensions (0.1.3)
|
252
|
-
xpath (3.0.0)
|
253
|
-
nokogiri (~> 1.8)
|
254
|
-
|
255
|
-
PLATFORMS
|
256
|
-
ruby
|
257
|
-
|
258
|
-
DEPENDENCIES
|
259
|
-
bundler (~> 1.16, >= 1.16.1)
|
260
|
-
byebug
|
261
|
-
capybara (~> 2.16, >= 2.16.1)
|
262
|
-
capybara-screenshot (~> 1.0, >= 1.0.18)
|
263
|
-
coffee-rails (~> 4.2)
|
264
|
-
database_cleaner (~> 1.6, >= 1.6.2)
|
265
|
-
devise (~> 4.0)
|
266
|
-
devise-secure_password!
|
267
|
-
flay (~> 2.10, >= 2.10.0)
|
268
|
-
jquery-rails (~> 4.3.1)
|
269
|
-
launchy (~> 2.4, >= 2.4.3)
|
270
|
-
rails (~> 5.0.0)
|
271
|
-
rake (~> 12.3)
|
272
|
-
rspec (~> 3.7)
|
273
|
-
rspec-rails (~> 3.7)
|
274
|
-
rspec_junit_formatter (~> 0.3)
|
275
|
-
rubocop (>= 0.49.0)
|
276
|
-
ruby2ruby (~> 2.4, >= 2.4.0)
|
277
|
-
sass-rails (~> 5.0)
|
278
|
-
selenium-webdriver (~> 3.7, >= 3.7.0)
|
279
|
-
shoulda-matchers!
|
280
|
-
simplecov (~> 0.15.1)
|
281
|
-
simplecov-console (~> 0.4.2)
|
282
|
-
sqlite3 (~> 1.3, >= 1.3.13)
|
283
|
-
therubyracer (~> 0.12.3)
|
284
|
-
|
285
|
-
BUNDLED WITH
|
286
|
-
1.16.1
|
@@ -1,45 +0,0 @@
|
|
1
|
-
module Devise
|
2
|
-
module SecurePassword
|
3
|
-
module Controllers
|
4
|
-
module ActiveHelpers
|
5
|
-
extend ActiveSupport::Concern
|
6
|
-
|
7
|
-
included do
|
8
|
-
before_action :pending_password_expired_redirect!, except: [:destroy]
|
9
|
-
end
|
10
|
-
|
11
|
-
# Redirect to password change page if password needs to be changed.
|
12
|
-
def pending_password_expired_redirect!
|
13
|
-
return unless skip_current_controller? && redirected_in_session? && warden.session && warden.session['secure_password_expired']
|
14
|
-
redirect_to edit_user_password_with_policy_url, alert: "#{error_string_for_password_expired}."
|
15
|
-
end
|
16
|
-
|
17
|
-
def redirected_in_session?
|
18
|
-
warden.authenticated? && warden.session['secure_password_last_controller'] == 'Devise::SessionsController'
|
19
|
-
end
|
20
|
-
|
21
|
-
# Prevent infinite loops and allow specified controllers to bypass.
|
22
|
-
# @NOTE: The ability to extend this list may be made public, in the
|
23
|
-
# future if that functionality is needed.
|
24
|
-
def skip_current_controller?
|
25
|
-
exclusion_list = [
|
26
|
-
'Devise::SessionsController',
|
27
|
-
'Devise::PasswordsWithPolicyController#edit',
|
28
|
-
'Devise::PasswordsWithPolicyController#update',
|
29
|
-
'DeviseInvitable::RegistrationsController#edit',
|
30
|
-
'DeviseInvitable::RegistrationsController#update'
|
31
|
-
]
|
32
|
-
!(exclusion_list.include?("#{self.class.name}#" + action_name) || (exclusion_list & self.class.ancestors.map(&:to_s)).any?)
|
33
|
-
end
|
34
|
-
|
35
|
-
def error_string_for_password_expired
|
36
|
-
return 'password expired' unless warden.user.class.respond_to?(:password_maximum_age)
|
37
|
-
I18n.t(
|
38
|
-
'secure_password.password_requires_regular_updates.errors.messages.password_expired',
|
39
|
-
timeframe: distance_of_time_in_words(warden.user.class.password_maximum_age)
|
40
|
-
)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
Binary file
|
Binary file
|
Binary file
|