devise-security 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -2
  3. data/app/controllers/devise/paranoid_verification_code_controller.rb +13 -1
  4. data/app/controllers/devise/password_expired_controller.rb +14 -1
  5. data/config/locales/bg.yml +41 -0
  6. data/config/locales/de.yml +2 -0
  7. data/config/locales/en.yml +2 -1
  8. data/lib/devise-security/models/database_authenticatable_patch.rb +15 -5
  9. data/lib/devise-security/models/password_archivable.rb +2 -2
  10. data/lib/devise-security/models/secure_validatable.rb +51 -15
  11. data/lib/devise-security/validators/password_complexity_validator.rb +53 -26
  12. data/lib/devise-security/version.rb +1 -1
  13. data/lib/devise-security.rb +7 -2
  14. data/lib/generators/templates/devise_security.rb +3 -1
  15. data/test/controllers/test_paranoid_verification_code_controller.rb +68 -0
  16. data/test/controllers/test_password_expired_controller.rb +38 -0
  17. data/test/dummy/app/controllers/overrides/paranoid_verification_code_controller.rb +7 -0
  18. data/test/dummy/app/controllers/overrides/password_expired_controller.rb +7 -0
  19. data/test/dummy/app/controllers/widgets_controller.rb +3 -0
  20. data/test/dummy/app/models/application_user_record.rb +2 -1
  21. data/test/dummy/app/models/mongoid/confirmable_fields.rb +2 -0
  22. data/test/dummy/app/models/mongoid/database_authenticable_fields.rb +4 -3
  23. data/test/dummy/app/models/mongoid/expirable_fields.rb +2 -0
  24. data/test/dummy/app/models/mongoid/lockable_fields.rb +2 -0
  25. data/test/dummy/app/models/mongoid/mappings.rb +4 -2
  26. data/test/dummy/app/models/mongoid/omniauthable_fields.rb +2 -0
  27. data/test/dummy/app/models/mongoid/paranoid_verification_fields.rb +2 -0
  28. data/test/dummy/app/models/mongoid/password_archivable_fields.rb +2 -0
  29. data/test/dummy/app/models/mongoid/password_expirable_fields.rb +2 -0
  30. data/test/dummy/app/models/mongoid/recoverable_fields.rb +2 -0
  31. data/test/dummy/app/models/mongoid/registerable_fields.rb +4 -2
  32. data/test/dummy/app/models/mongoid/rememberable_fields.rb +2 -0
  33. data/test/dummy/app/models/mongoid/secure_validatable_fields.rb +2 -0
  34. data/test/dummy/app/models/mongoid/security_questionable_fields.rb +2 -0
  35. data/test/dummy/app/models/mongoid/session_limitable_fields.rb +2 -0
  36. data/test/dummy/app/models/mongoid/timeoutable_fields.rb +2 -0
  37. data/test/dummy/app/models/mongoid/trackable_fields.rb +2 -0
  38. data/test/dummy/app/models/mongoid/validatable_fields.rb +2 -0
  39. data/test/dummy/app/models/paranoid_verification_user.rb +26 -0
  40. data/test/dummy/app/models/password_expired_user.rb +26 -0
  41. data/test/dummy/app/models/user.rb +1 -2
  42. data/test/dummy/app/models/widget.rb +1 -3
  43. data/test/dummy/app/mongoid/one_user.rb +5 -5
  44. data/test/dummy/app/mongoid/user_on_engine.rb +2 -2
  45. data/test/dummy/app/mongoid/user_on_main_app.rb +2 -2
  46. data/test/dummy/app/mongoid/user_with_validations.rb +3 -3
  47. data/test/dummy/app/mongoid/user_without_email.rb +3 -3
  48. data/test/dummy/config/application.rb +4 -4
  49. data/test/dummy/config/boot.rb +1 -1
  50. data/test/dummy/config/environment.rb +1 -1
  51. data/test/dummy/config/locales/en.yml +10 -0
  52. data/test/dummy/config/routes.rb +2 -0
  53. data/test/dummy/db/migrate/20120508165529_create_tables.rb +3 -3
  54. data/test/dummy/lib/shared_expirable_columns.rb +1 -0
  55. data/test/dummy/lib/shared_security_questions_fields.rb +1 -0
  56. data/test/dummy/lib/shared_user.rb +17 -6
  57. data/test/dummy/lib/shared_user_without_email.rb +2 -1
  58. data/test/dummy/lib/shared_user_without_omniauth.rb +12 -3
  59. data/test/dummy/lib/shared_verification_fields.rb +1 -0
  60. data/test/dummy/log/development.log +0 -883
  61. data/test/dummy/log/test.log +95414 -15570
  62. data/test/integration/test_session_limitable_workflow.rb +2 -0
  63. data/test/orm/active_record.rb +7 -7
  64. data/test/test_compatibility.rb +2 -0
  65. data/test/test_complexity_validator.rb +246 -37
  66. data/test/test_database_authenticatable_patch.rb +146 -0
  67. data/test/test_helper.rb +7 -8
  68. data/test/test_install_generator.rb +1 -1
  69. data/test/test_paranoid_verification.rb +0 -1
  70. data/test/test_password_archivable.rb +34 -11
  71. data/test/test_password_expirable.rb +26 -26
  72. data/test/test_secure_validatable.rb +273 -107
  73. data/test/test_secure_validatable_overrides.rb +185 -0
  74. data/test/test_session_limitable.rb +2 -2
  75. data/test/tmp/config/initializers/{devise-security.rb → devise_security.rb} +3 -1
  76. data/test/tmp/config/locales/devise.security_extension.de.yml +2 -0
  77. data/test/tmp/config/locales/devise.security_extension.en.yml +2 -1
  78. data/test/tmp/config/locales/devise.security_extension.hi.yml +20 -20
  79. metadata +42 -19
  80. data/test/dummy/app/models/secure_user.rb +0 -9
@@ -0,0 +1,185 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'test_helper'
4
+
5
+ class TestSecureValidatableOverrides < ActiveSupport::TestCase
6
+ class ::CustomClassPasswordValidator < DeviseSecurity::PasswordComplexityValidator
7
+ def patterns
8
+ super.merge(letter: /\p{Alpha}/)
9
+ end
10
+ end
11
+
12
+ class ::CustomInstancePasswordValidator < DeviseSecurity::PasswordComplexityValidator
13
+ # Add a pattern for alphanumeric characters. See
14
+ # [en.yml](file:///./test/dummy/config/locales/en.yml) for translations used in
15
+ # tests.
16
+ def patterns
17
+ super.merge(alnum: /\p{Alnum}/)
18
+ end
19
+ end
20
+
21
+ class User < ApplicationRecord
22
+ devise :database_authenticatable, :secure_validatable
23
+ include ::Mongoid::Mappings if DEVISE_ORM == :mongoid
24
+ end
25
+
26
+ class ClassLevelOverrideUser < User
27
+ self.allow_passwords_equal_to_email = true
28
+ self.email_validation = false
29
+ self.password_complexity = { symbol: 1, letter: 1 }
30
+ self.password_complexity_validator = 'custom_class_password_validator'
31
+ self.password_length = 10..100
32
+ end
33
+
34
+ class InstanceLevelOverrideUser < ClassLevelOverrideUser
35
+ def allow_passwords_equal_to_email
36
+ true
37
+ end
38
+
39
+ def email_validation
40
+ false
41
+ end
42
+
43
+ def password_complexity
44
+ { symbol: 2, alnum: 1 }
45
+ end
46
+
47
+ def password_length
48
+ 11..100
49
+ end
50
+
51
+ def password_complexity_validator
52
+ 'CustomInstancePasswordValidator'
53
+ end
54
+ end
55
+
56
+ test 'email equal to password can be overridden at the class level' do
57
+ user = ClassLevelOverrideUser.new(
58
+ email: 'bob1!@microsoft.com',
59
+ password: 'bob1!@microsoft.com',
60
+ password_confirmation: 'bob1!@microsoft.com'
61
+ )
62
+
63
+ assert user.valid?
64
+ end
65
+
66
+ test 'email equal to password can be overridden at the instance level' do
67
+ user = InstanceLevelOverrideUser.new(
68
+ email: 'bob1!@microsoft.com',
69
+ password: 'bob1!@microsoft.com',
70
+ password_confirmation: 'bob1!@microsoft.com'
71
+ )
72
+
73
+ assert user.valid?
74
+ end
75
+
76
+ test 'email validation can be overridden at the class level' do
77
+ user = ClassLevelOverrideUser.new(
78
+ email: 'bob1!@f.com',
79
+ password: 'Pa3zZ1!!aaaaaa',
80
+ password_confirmation: 'Pa3zZ1!!aaaaaa'
81
+ )
82
+
83
+ assert user.valid?
84
+ end
85
+
86
+ test 'email validation can be overridden at the instance level' do
87
+ user = InstanceLevelOverrideUser.new(
88
+ email: 'bob1!@f.com',
89
+ password: 'Pa3zZ1!!aaaaaa',
90
+ password_confirmation: 'Pa3zZ1!!aaaaaa'
91
+ )
92
+
93
+ assert user.valid?
94
+ end
95
+
96
+ test 'password complexity can be overridden at the class level' do
97
+ user = ClassLevelOverrideUser.new(
98
+ email: 'bob@microsoft.com',
99
+ password: 'PASSwordddd',
100
+ password_confirmation: 'PASSwordddd'
101
+ )
102
+
103
+ assert user.invalid?
104
+ assert_equal(
105
+ ['Password must contain at least one punctuation mark or symbol'],
106
+ user.errors.full_messages
107
+ )
108
+ end
109
+
110
+ test 'password complexity can be overridden at the instance level' do
111
+ user = InstanceLevelOverrideUser.new(
112
+ email: 'bob@microsoft.com',
113
+ password: 'PASSwordddd',
114
+ password_confirmation: 'PASSwordddd'
115
+ )
116
+
117
+ assert user.invalid?
118
+ assert_equal(
119
+ ['Password must contain at least 2 punctuation marks or symbols'],
120
+ user.errors.full_messages
121
+ )
122
+ end
123
+
124
+ test 'password length can be overridden at the class level' do
125
+ user = ClassLevelOverrideUser.new(
126
+ email: 'bob@microsoft.com',
127
+ password: 'Pa3zZ1!',
128
+ password_confirmation: 'Pa3zZ1!'
129
+ )
130
+
131
+ assert user.invalid?
132
+ assert_equal(
133
+ ['Password is too short (minimum is 10 characters)'],
134
+ user.errors.full_messages
135
+ )
136
+ end
137
+
138
+ test 'password length can be overridden at the instance level' do
139
+ user = InstanceLevelOverrideUser.new(
140
+ email: 'bob@microsoft.com',
141
+ password: 'Pa3zZ1!!',
142
+ password_confirmation: 'Pa3zZ1!!'
143
+ )
144
+
145
+ assert user.invalid?
146
+ assert_equal(
147
+ ['Password is too short (minimum is 11 characters)'],
148
+ user.errors.full_messages
149
+ )
150
+ end
151
+
152
+ test 'password validator can be overridden at the instance level' do
153
+ password = '!' * 11 # 11 characters, all symbols
154
+ user = InstanceLevelOverrideUser.new(
155
+ email: 'bob@microsoft.com',
156
+ password: password,
157
+ password_confirmation: password
158
+ )
159
+
160
+ assert user.invalid?
161
+ # This validation error only occurs when the CustomInstancePasswordValidator
162
+ # is used.
163
+ assert_equal(
164
+ ['Password must contain at least one letter or number'],
165
+ user.errors.full_messages
166
+ )
167
+ end
168
+
169
+ test 'password validator can be overridden at the class level' do
170
+ password = '!' * 10 # 10 characters, all symbols
171
+ user = ClassLevelOverrideUser.new(
172
+ email: 'bob@microsoft.com',
173
+ password: password,
174
+ password_confirmation: password
175
+ )
176
+
177
+ assert user.invalid?
178
+ # This validation error only occurs when the CustomClassPasswordValidator
179
+ # is used.
180
+ assert_equal(
181
+ ['Password must contain at least one letter'],
182
+ user.errors.full_messages
183
+ )
184
+ end
185
+ end
@@ -18,7 +18,7 @@ class TestSessionLimitable < ActiveSupport::TestCase
18
18
  modified_user = ModifiedUser.create email: 'bob2@microsoft.com', password: 'password1', password_confirmation: 'password1'
19
19
  assert_equal(true, modified_user.skip_session_limitable?)
20
20
  end
21
-
21
+
22
22
  class SessionLimitableUser < User
23
23
  devise :session_limitable
24
24
  include ::Mongoid::Mappings if DEVISE_ORM == :mongoid
@@ -51,7 +51,7 @@ class TestSessionLimitable < ActiveSupport::TestCase
51
51
 
52
52
  test '#update_unique_session_id!(value) raises an exception on an unpersisted record' do
53
53
  user = User.create
54
- assert !user.persisted?
54
+ assert_not user.persisted?
55
55
  assert_raises(Devise::Models::Compatibility::NotPersistedError) { user.update_unique_session_id!('unique_value') }
56
56
  end
57
57
  end
@@ -7,7 +7,9 @@ Devise.setup do |config|
7
7
  # Should the password expire (e.g 3.months)
8
8
  # config.expire_password_after = false
9
9
 
10
- # Need 1 char of A-Z, a-z and 0-9
10
+ # Need 1 char each of: A-Z, a-z, 0-9, and a punctuation mark or symbol
11
+ # You may use "digits" in place of "digit" and "symbols" in place of
12
+ # "symbol" based on your preference
11
13
  # config.password_complexity = { digit: 1, lower: 1, symbol: 1, upper: 1 }
12
14
 
13
15
  # How many passwords to keep in archive
@@ -19,8 +19,10 @@ de:
19
19
  other: muss mindestens %{count} Großbuchstaben enthalten
20
20
  devise:
21
21
  invalid_captcha: 'Die Captcha-Eingabe ist nicht gültig.'
22
+ invalid_security_question: 'Die Antwort auf die Sicherheitsfrage war ungültig.'
22
23
  paranoid_verify:
23
24
  code_required: 'Bitte geben Sie den Code ein, den unser Support-Team zur Verfügung gestellt hat.'
25
+ paranoid_verification_code:
24
26
  show:
25
27
  submit_verification_code: Bestätigungscode eingeben
26
28
  verification_code: Bestätigungscode
@@ -7,7 +7,7 @@ en:
7
7
  password_complexity:
8
8
  digit:
9
9
  one: must contain at least one digit
10
- other: must contain at least %{count} numerals
10
+ other: must contain at least %{count} digits
11
11
  lower:
12
12
  one: must contain at least one lower-case letter
13
13
  other: must contain at least %{count} lower-case letters
@@ -23,6 +23,7 @@ en:
23
23
  paranoid_verify:
24
24
  code_required: 'Please enter the code our support team provided'
25
25
  paranoid_verification_code:
26
+ updated: Verification code accepted
26
27
  show:
27
28
  submit_verification_code: Submit verification code
28
29
  verification_code: Verification code
@@ -2,41 +2,41 @@
2
2
  hi:
3
3
  errors:
4
4
  messages:
5
- taken_in_past: यह पासवर्ड, आपके द्वारा पूर्व मे प्रयोग किया जा चुका है
6
- equal_to_current_password: नया पासवर्ड, वर्तमान पासवर्ड से भिन्न होना चाहिए
5
+ taken_in_past: यह पासवर्ड, आपके द्वारा पूर्व मे प्रयोग किया जा चुका है
6
+ equal_to_current_password: नया पासवर्ड, वर्तमान पासवर्ड से भिन्न होना चाहिए
7
7
  equal_to_email: ईमेल से अलग होना चाहिए
8
8
  password_complexity:
9
9
  digit:
10
- one: एक अंक होना चाहिए
11
- other: कम से कम %{count} अंक होने चाहिए
10
+ one: एक अंक होना चाहिए
11
+ other: कम से कम %{count} अंक होने चाहिए
12
12
  lower:
13
- one: एक लोअर-केस अक्षर होना चाहिए
14
- other: कम से कम %{count} अक्षर होने चाहिए
13
+ one: एक लोअर-केस अक्षर होना चाहिए
14
+ other: कम से कम %{count} अक्षर होने चाहिए
15
15
  symbol:
16
- one: एक चिन्ह होना चाहिए
17
- other: कम से कम %{count} चिन्ह होने चाहिए
16
+ one: एक चिन्ह होना चाहिए
17
+ other: कम से कम %{count} चिन्ह होने चाहिए
18
18
  upper:
19
- one: एक अपर-केस अक्षर होना चाहिए
20
- other: कम से कम %{count} अपर-केस अक्षर होने चाहिए
19
+ one: एक अपर-केस अक्षर होना चाहिए
20
+ other: कम से कम %{count} अपर-केस अक्षर होने चाहिए
21
21
  devise:
22
22
  invalid_captcha: अमान्य कॅप्टचा
23
23
  invalid_security_question: अमान्य सुरक्षा उत्तर
24
24
  paranoid_verify:
25
- code_required: सपोर्ट टीम द्वारा दिया गया कोड डाले
25
+ code_required: सपोर्ट टीम द्वारा दिया गया कोड डाले
26
26
  paranoid_verification_code:
27
27
  show:
28
- submit_verification_code: वेरिफिकेशन कोड डाले
29
- verification_code: वेरिफिकेशन कोड
30
- submit: सबमिट
28
+ submit_verification_code: वेरिफिकेशन कोड डाले
29
+ verification_code: वेरिफिकेशन कोड
30
+ submit: सबमिट
31
31
  password_expired:
32
32
  updated: पासवर्ड अद्यतन किया गया
33
- change_required: पासवर्ड अमान्य हो चुका, पासवर्ड बदले
33
+ change_required: पासवर्ड अमान्य हो चुका, पासवर्ड बदले
34
34
  show:
35
- renew_your_password: पासवर्ड बदले
35
+ renew_your_password: पासवर्ड बदले
36
36
  current_password: वर्तमान पासवर्ड
37
- new_password: नया पासवर्ड
38
- new_password_confirmation: नए पासवर्ड की पुष्टि करें
39
- change_my_password: पासवर्ड बदले
37
+ new_password: नया पासवर्ड
38
+ new_password_confirmation: नए पासवर्ड की पुष्टि करें
39
+ change_my_password: पासवर्ड बदले
40
40
  failure:
41
- session_limited: जानकारी, दूसरे ब्राउज़र में उपयोग की गयी थी जारी रखने फिर से साइन-इन करे
41
+ session_limited: जानकारी, दूसरे ब्राउज़र में उपयोग की गयी थी जारी रखने फिर से साइन-इन करे
42
42
  expired: कोई गतिविधि न होने के कारण खाता बंद हो गया, सिस्टम व्यवस्थापक से संपर्क करें
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-security
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Scholl
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2021-05-03 00:00:00.000000000 Z
15
+ date: 2021-12-29 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: devise
@@ -21,9 +21,6 @@ dependencies:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
23
  version: 4.3.0
24
- - - "<"
25
- - !ruby/object:Gem::Version
26
- version: '5.0'
27
24
  type: :runtime
28
25
  prerelease: false
29
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -31,9 +28,6 @@ dependencies:
31
28
  - - ">="
32
29
  - !ruby/object:Gem::Version
33
30
  version: 4.3.0
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '5.0'
37
31
  - !ruby/object:Gem::Dependency
38
32
  name: appraisal
39
33
  requirement: !ruby/object:Gem::Requirement
@@ -122,16 +116,16 @@ dependencies:
122
116
  name: omniauth
123
117
  requirement: !ruby/object:Gem::Requirement
124
118
  requirements:
125
- - - "<"
119
+ - - ">="
126
120
  - !ruby/object:Gem::Version
127
- version: 3.0.0
121
+ version: '0'
128
122
  type: :development
129
123
  prerelease: false
130
124
  version_requirements: !ruby/object:Gem::Requirement
131
125
  requirements:
132
- - - "<"
126
+ - - ">="
133
127
  - !ruby/object:Gem::Version
134
- version: 3.0.0
128
+ version: '0'
135
129
  - !ruby/object:Gem::Dependency
136
130
  name: pry-byebug
137
131
  requirement: !ruby/object:Gem::Requirement
@@ -180,14 +174,14 @@ dependencies:
180
174
  requirements:
181
175
  - - "~>"
182
176
  - !ruby/object:Gem::Version
183
- version: 0.80.0
177
+ version: 0.83.0
184
178
  type: :development
185
179
  prerelease: false
186
180
  version_requirements: !ruby/object:Gem::Requirement
187
181
  requirements:
188
182
  - - "~>"
189
183
  - !ruby/object:Gem::Version
190
- version: 0.80.0
184
+ version: 0.83.0
191
185
  - !ruby/object:Gem::Dependency
192
186
  name: rubocop-rails
193
187
  requirement: !ruby/object:Gem::Requirement
@@ -230,6 +224,20 @@ dependencies:
230
224
  - - ">="
231
225
  - !ruby/object:Gem::Version
232
226
  version: '0'
227
+ - !ruby/object:Gem::Dependency
228
+ name: solargraph-arc
229
+ requirement: !ruby/object:Gem::Requirement
230
+ requirements:
231
+ - - ">="
232
+ - !ruby/object:Gem::Version
233
+ version: '0'
234
+ type: :development
235
+ prerelease: false
236
+ version_requirements: !ruby/object:Gem::Requirement
237
+ requirements:
238
+ - - ">="
239
+ - !ruby/object:Gem::Version
240
+ version: '0'
233
241
  description: An enterprise security extension for devise.
234
242
  email: natebird@gmail.com
235
243
  executables: []
@@ -242,6 +250,7 @@ files:
242
250
  - app/controllers/devise/password_expired_controller.rb
243
251
  - app/views/devise/paranoid_verification_code/show.html.erb
244
252
  - app/views/devise/password_expired/show.html.erb
253
+ - config/locales/bg.yml
245
254
  - config/locales/by.yml
246
255
  - config/locales/cs.yml
247
256
  - config/locales/de.yml
@@ -297,6 +306,7 @@ files:
297
306
  - lib/generators/devise_security/install_generator.rb
298
307
  - lib/generators/templates/devise_security.rb
299
308
  - test/controllers/test_captcha_controller.rb
309
+ - test/controllers/test_paranoid_verification_code_controller.rb
300
310
  - test/controllers/test_password_expired_controller.rb
301
311
  - test/controllers/test_security_question_controller.rb
302
312
  - test/dummy/Rakefile
@@ -304,6 +314,8 @@ files:
304
314
  - test/dummy/app/controllers/application_controller.rb
305
315
  - test/dummy/app/controllers/captcha/sessions_controller.rb
306
316
  - test/dummy/app/controllers/foos_controller.rb
317
+ - test/dummy/app/controllers/overrides/paranoid_verification_code_controller.rb
318
+ - test/dummy/app/controllers/overrides/password_expired_controller.rb
307
319
  - test/dummy/app/controllers/security_question/unlocks_controller.rb
308
320
  - test/dummy/app/controllers/widgets_controller.rb
309
321
  - test/dummy/app/models/application_record.rb
@@ -327,7 +339,8 @@ files:
327
339
  - test/dummy/app/models/mongoid/timeoutable_fields.rb
328
340
  - test/dummy/app/models/mongoid/trackable_fields.rb
329
341
  - test/dummy/app/models/mongoid/validatable_fields.rb
330
- - test/dummy/app/models/secure_user.rb
342
+ - test/dummy/app/models/paranoid_verification_user.rb
343
+ - test/dummy/app/models/password_expired_user.rb
331
344
  - test/dummy/app/models/security_question_user.rb
332
345
  - test/dummy/app/models/user.rb
333
346
  - test/dummy/app/models/widget.rb
@@ -347,6 +360,7 @@ files:
347
360
  - test/dummy/config/environments/test.rb
348
361
  - test/dummy/config/initializers/devise.rb
349
362
  - test/dummy/config/initializers/migration_class.rb
363
+ - test/dummy/config/locales/en.yml
350
364
  - test/dummy/config/mongoid.yml
351
365
  - test/dummy/config/routes.rb
352
366
  - test/dummy/config/secrets.yml
@@ -376,14 +390,16 @@ files:
376
390
  - test/support/mongoid.yml
377
391
  - test/test_compatibility.rb
378
392
  - test/test_complexity_validator.rb
393
+ - test/test_database_authenticatable_patch.rb
379
394
  - test/test_helper.rb
380
395
  - test/test_install_generator.rb
381
396
  - test/test_paranoid_verification.rb
382
397
  - test/test_password_archivable.rb
383
398
  - test/test_password_expirable.rb
384
399
  - test/test_secure_validatable.rb
400
+ - test/test_secure_validatable_overrides.rb
385
401
  - test/test_session_limitable.rb
386
- - test/tmp/config/initializers/devise-security.rb
402
+ - test/tmp/config/initializers/devise_security.rb
387
403
  - test/tmp/config/locales/devise.security_extension.by.yml
388
404
  - test/tmp/config/locales/devise.security_extension.cs.yml
389
405
  - test/tmp/config/locales/devise.security_extension.de.yml
@@ -420,7 +436,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
420
436
  - !ruby/object:Gem::Version
421
437
  version: '0'
422
438
  requirements: []
423
- rubygems_version: 3.0.9
439
+ rubygems_version: 3.3.0
424
440
  signing_key:
425
441
  specification_version: 4
426
442
  summary: Security extension for devise
@@ -453,11 +469,14 @@ test_files:
453
469
  - test/dummy/app/models/mongoid/omniauthable_fields.rb
454
470
  - test/dummy/app/models/security_question_user.rb
455
471
  - test/dummy/app/models/application_user_record.rb
456
- - test/dummy/app/models/secure_user.rb
457
472
  - test/dummy/app/models/widget.rb
473
+ - test/dummy/app/models/password_expired_user.rb
474
+ - test/dummy/app/models/paranoid_verification_user.rb
458
475
  - test/dummy/app/models/application_record.rb
459
476
  - test/dummy/app/models/captcha_user.rb
460
477
  - test/dummy/app/models/user.rb
478
+ - test/dummy/app/controllers/overrides/password_expired_controller.rb
479
+ - test/dummy/app/controllers/overrides/paranoid_verification_code_controller.rb
461
480
  - test/dummy/app/controllers/application_controller.rb
462
481
  - test/dummy/app/controllers/captcha/sessions_controller.rb
463
482
  - test/dummy/app/controllers/foos_controller.rb
@@ -468,6 +487,7 @@ test_files:
468
487
  - test/dummy/config/secrets.yml
469
488
  - test/dummy/config/routes.rb
470
489
  - test/dummy/config/mongoid.yml
490
+ - test/dummy/config/locales/en.yml
471
491
  - test/dummy/config/environments/test.rb
472
492
  - test/dummy/config/environment.rb
473
493
  - test/dummy/config/application.rb
@@ -496,9 +516,11 @@ test_files:
496
516
  - test/dummy/log/test.log
497
517
  - test/dummy/log/development.log
498
518
  - test/test_install_generator.rb
519
+ - test/test_secure_validatable_overrides.rb
499
520
  - test/test_paranoid_verification.rb
500
521
  - test/integration/test_session_limitable_workflow.rb
501
522
  - test/integration/test_password_expirable_workflow.rb
523
+ - test/test_database_authenticatable_patch.rb
502
524
  - test/test_secure_validatable.rb
503
525
  - test/test_session_limitable.rb
504
526
  - test/support/mongoid.yml
@@ -509,6 +531,7 @@ test_files:
509
531
  - test/test_compatibility.rb
510
532
  - test/test_password_expirable.rb
511
533
  - test/controllers/test_security_question_controller.rb
534
+ - test/controllers/test_paranoid_verification_code_controller.rb
512
535
  - test/controllers/test_captcha_controller.rb
513
536
  - test/controllers/test_password_expired_controller.rb
514
537
  - test/tmp/config/locales/devise.security_extension.by.yml
@@ -528,5 +551,5 @@ test_files:
528
551
  - test/tmp/config/locales/devise.security_extension.uk.yml
529
552
  - test/tmp/config/locales/devise.security_extension.zh_TW.yml
530
553
  - test/tmp/config/locales/devise.security_extension.cs.yml
531
- - test/tmp/config/initializers/devise-security.rb
554
+ - test/tmp/config/initializers/devise_security.rb
532
555
  - test/test_complexity_validator.rb
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class SecureUser < ApplicationUserRecord
4
- devise :database_authenticatable, :secure_validatable, email_validation: false
5
- if DEVISE_ORM == :mongoid
6
- require './test/dummy/app/models/mongoid/mappings'
7
- include ::Mongoid::Mappings
8
- end
9
- end