devise-security 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +63 -0
  3. data/.gitignore +2 -0
  4. data/.mdlrc +1 -0
  5. data/.rubocop.yml +2 -1
  6. data/.ruby-version +1 -1
  7. data/.travis.yml +9 -11
  8. data/Appraisals +2 -2
  9. data/README.md +72 -53
  10. data/app/controllers/devise/paranoid_verification_code_controller.rb +2 -0
  11. data/app/controllers/devise/password_expired_controller.rb +2 -0
  12. data/config/locales/de.yml +13 -1
  13. data/config/locales/en.yml +13 -1
  14. data/config/locales/es.yml +13 -1
  15. data/config/locales/fr.yml +29 -0
  16. data/config/locales/tr.yml +17 -0
  17. data/devise-security.gemspec +10 -10
  18. data/gemfiles/{rails_4.1_stable.gemfile → rails_5.2.0.gemfile} +1 -1
  19. data/lib/devise-security.rb +8 -4
  20. data/lib/devise-security/controllers/helpers.rb +2 -0
  21. data/lib/devise-security/hooks/expirable.rb +3 -1
  22. data/lib/devise-security/hooks/paranoid_verification.rb +2 -0
  23. data/lib/devise-security/hooks/password_expirable.rb +2 -0
  24. data/lib/devise-security/hooks/session_limitable.rb +2 -0
  25. data/lib/devise-security/models/compatibility.rb +2 -0
  26. data/lib/devise-security/models/database_authenticatable_patch.rb +2 -0
  27. data/lib/devise-security/models/expirable.rb +2 -0
  28. data/lib/devise-security/models/old_password.rb +2 -0
  29. data/lib/devise-security/models/paranoid_verification.rb +2 -0
  30. data/lib/devise-security/models/password_archivable.rb +2 -0
  31. data/lib/devise-security/models/password_expirable.rb +96 -50
  32. data/lib/devise-security/models/secure_validatable.rb +10 -4
  33. data/lib/devise-security/models/security_questionable.rb +2 -0
  34. data/lib/devise-security/models/session_limitable.rb +2 -0
  35. data/lib/devise-security/orm/active_record.rb +2 -0
  36. data/lib/devise-security/patches.rb +2 -0
  37. data/lib/devise-security/patches/confirmations_controller_captcha.rb +2 -0
  38. data/lib/devise-security/patches/confirmations_controller_security_question.rb +2 -0
  39. data/lib/devise-security/patches/controller_captcha.rb +2 -0
  40. data/lib/devise-security/patches/controller_security_question.rb +2 -0
  41. data/lib/devise-security/patches/passwords_controller_captcha.rb +2 -0
  42. data/lib/devise-security/patches/passwords_controller_security_question.rb +2 -0
  43. data/lib/devise-security/patches/registrations_controller_captcha.rb +2 -0
  44. data/lib/devise-security/patches/sessions_controller_captcha.rb +2 -0
  45. data/lib/devise-security/patches/unlocks_controller_captcha.rb +2 -0
  46. data/lib/devise-security/patches/unlocks_controller_security_question.rb +2 -0
  47. data/lib/devise-security/rails.rb +2 -0
  48. data/lib/devise-security/routes.rb +2 -0
  49. data/lib/devise-security/schema.rb +2 -0
  50. data/lib/devise-security/validators/password_complexity_validator.rb +33 -0
  51. data/lib/devise-security/version.rb +3 -1
  52. data/lib/generators/devise_security/install_generator.rb +3 -1
  53. data/lib/generators/templates/devise-security.rb +9 -3
  54. data/test/dummy/Rakefile +3 -1
  55. data/test/dummy/app/controllers/application_controller.rb +2 -0
  56. data/test/dummy/app/controllers/captcha/sessions_controller.rb +2 -0
  57. data/test/dummy/app/controllers/security_question/unlocks_controller.rb +2 -0
  58. data/test/dummy/app/models/application_record.rb +2 -0
  59. data/test/dummy/app/models/captcha_user.rb +3 -1
  60. data/test/dummy/app/models/secure_user.rb +3 -1
  61. data/test/dummy/app/models/security_question_user.rb +3 -1
  62. data/test/dummy/app/models/user.rb +2 -0
  63. data/test/dummy/app/models/widget.rb +2 -0
  64. data/test/dummy/config.ru +3 -1
  65. data/test/dummy/config/application.rb +2 -0
  66. data/test/dummy/config/boot.rb +2 -0
  67. data/test/dummy/config/environment.rb +2 -0
  68. data/test/dummy/config/environments/test.rb +2 -0
  69. data/test/dummy/config/initializers/devise.rb +8 -0
  70. data/test/dummy/config/initializers/migration_class.rb +2 -0
  71. data/test/dummy/config/routes.rb +2 -0
  72. data/test/dummy/db/migrate/20120508165529_create_tables.rb +2 -0
  73. data/test/dummy/db/migrate/20150402165590_add_verification_columns.rb +2 -0
  74. data/test/dummy/db/migrate/20150407162345_add_verification_attempt_column.rb +2 -0
  75. data/test/dummy/db/migrate/20160320162345_add_security_questions_fields.rb +2 -0
  76. data/test/dummy/db/migrate/20180318103603_add_expireable_columns.rb +2 -0
  77. data/test/dummy/db/migrate/20180318105329_add_confirmable_columns.rb +2 -0
  78. data/test/dummy/db/migrate/20180318105732_add_rememberable_columns.rb +2 -0
  79. data/test/dummy/db/migrate/20180318111336_add_recoverable_columns.rb +2 -0
  80. data/test/dummy/db/migrate/20180319114023_add_widget.rb +2 -0
  81. data/test/test_captcha_controller.rb +2 -0
  82. data/test/test_complexity_validator.rb +60 -0
  83. data/test/test_helper.rb +19 -8
  84. data/test/test_install_generator.rb +7 -1
  85. data/test/test_paranoid_verification.rb +2 -0
  86. data/test/test_password_archivable.rb +2 -0
  87. data/test/test_password_expirable.rb +68 -7
  88. data/test/test_password_expired_controller.rb +2 -0
  89. data/test/test_secure_validatable.rb +10 -11
  90. data/test/test_security_question_controller.rb +2 -0
  91. metadata +32 -39
  92. data/.circleci/config.yml +0 -41
  93. data/gemfiles/rails_5.2_rc1.gemfile +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ccd3b9a01ec2f531013bbed8d14cbf3131f2630d2c2d1a56d119268f1aa696c
4
- data.tar.gz: f9305b860b267fd4f49dc724864d1d822c1e4d0f952be56f78d02d1c6b1a1b3c
3
+ metadata.gz: 85c4ba49803f532f05e0068cb2c2277385945e50af8afc92afd7fc2d11952872
4
+ data.tar.gz: 5267a9c636fe9dd641f1743e0d21d36a925c89878b91fb9c04e922a04719cd00
5
5
  SHA512:
6
- metadata.gz: f176d4afaee6b712cc7fa83c234cca6f286729f8a03660c33d10cf5cd363f49f70e56440f3e9e960f275ef4f7b2a846f60984af73e46e55f73266b431314cee1
7
- data.tar.gz: 00e810e6e1c6c1845cc67d534206378c111499f09bb849a8d4129b20bc4c52a89b9261cfaf07ec7bb243995cc016f50f26c99eba29a9c1c148b3d9ec8b6632c5
6
+ metadata.gz: d0155aafc0542df604d7c5f9c4041cb61b845942e321b818af1d0295196ab964ba1ef180061d6c2b2268091d6a47289e97bc6762fe6af6f0c5c4a32e1e4a9769
7
+ data.tar.gz: 958fac64a85c9cd791146c832d8a586b0c2a14ae0e561a828bef4766a97002910d033d84854b206e28d7ebb2c13a7b6e416044ccdcefb16afdff541a059e1500
@@ -0,0 +1,63 @@
1
+ version: "2"
2
+ checks:
3
+ argument-count:
4
+ enabled: true
5
+ config:
6
+ threshold: 4
7
+ complex-logic:
8
+ enabled: true
9
+ config:
10
+ threshold: 4
11
+ file-lines:
12
+ enabled: true
13
+ config:
14
+ threshold: 250
15
+ method-complexity:
16
+ enabled: true
17
+ config:
18
+ threshold: 5
19
+ method-count:
20
+ enabled: true
21
+ config:
22
+ threshold: 20
23
+ method-lines:
24
+ enabled: true
25
+ config:
26
+ threshold: 25
27
+ nested-control-flow:
28
+ enabled: true
29
+ config:
30
+ threshold: 4
31
+ return-statements:
32
+ enabled: true
33
+ config:
34
+ threshold: 4
35
+ similar-code:
36
+ enabled: true
37
+ config:
38
+ threshold: #language-specific defaults. overrides affect all languages.
39
+ identical-code:
40
+ enabled: true
41
+ config:
42
+ threshold: #language-specific defaults. overrides affect all languages.
43
+ plugins:
44
+ rubocop:
45
+ enabled: true
46
+ channel: rubocop-0-58
47
+ markdownlint:
48
+ enabled: true
49
+ brakeman:
50
+ enabled: true
51
+ exclude_patterns:
52
+ - "config/"
53
+ - "db/"
54
+ - "dist/"
55
+ - "features/"
56
+ - "**/node_modules/"
57
+ - "script/"
58
+ - "**/spec/"
59
+ - "**/test/"
60
+ - "**/tests/"
61
+ - "**/vendor/"
62
+ - "**/*.d.ts"
63
+ - "gemfiles/"
data/.gitignore CHANGED
@@ -38,3 +38,5 @@ test/tmp/*
38
38
  *.gem
39
39
  Gemfile.lock
40
40
  *.lock
41
+ bin/*
42
+ .yardoc
data/.mdlrc ADDED
@@ -0,0 +1 @@
1
+ rules "~MD013"
@@ -6,6 +6,7 @@ AllCops:
6
6
  - 'lib/tasks/**/*'
7
7
  Exclude:
8
8
  - Gemfile*
9
+ - README
9
10
  - 'db/**/*'
10
11
  - 'config/**/*'
11
12
  - 'bin/**/*'
@@ -21,7 +22,7 @@ Metrics/MethodLength:
21
22
  Enabled: false
22
23
 
23
24
  Metrics/LineLength:
24
- Max: 100
25
+ Enabled: false
25
26
 
26
27
  Naming/FileName:
27
28
  Exclude: ["devise-security.gemspec"]
@@ -1 +1 @@
1
- 2.2.9
1
+ 2.3.7
@@ -1,25 +1,23 @@
1
1
  language: ruby
2
- before_install: gem install bundler && bundler -v
2
+ before_install: gem install bundler && bundle -v
3
3
  install: bundle install --jobs=3 --retry=3
4
4
  before_script: bundle install
5
5
  script: bundle exec rake
6
6
  rvm:
7
- - 2.2.9
8
- - 2.3.6
9
- - 2.4.3
10
- - 2.5.0
7
+ - 2.3.7
8
+ - 2.4.4
9
+ - 2.5.1
11
10
  - ruby-head
12
11
  matrix:
13
12
  allow_failures:
14
13
  - rvm: ruby-head
15
14
  - gemfile: gemfiles/rails_5.2_rc1.gemfile
16
- - rvm: 2.4.3
17
- gemfile: gemfiles/rails_4.1_stable.gemfile
18
- - rvm: 2.5.0
19
- gemfile: gemfiles/rails_4.1_stable.gemfile
15
+ - rvm: 2.4.4
16
+ gemfile: gemfiles/rails_4.2_stable.gemfile
17
+ - rvm: 2.5.1
18
+ gemfile: gemfiles/rails_4.2_stable.gemfile
20
19
  gemfile:
21
- - gemfiles/rails_4.1_stable.gemfile
22
20
  - gemfiles/rails_4.2_stable.gemfile
23
21
  - gemfiles/rails_5.0_stable.gemfile
24
22
  - gemfiles/rails_5.1_stable.gemfile
25
- - gemfiles/rails_5.2_rc1.gemfile
23
+ - gemfiles/rails_5.2.0.gemfile
data/Appraisals CHANGED
@@ -14,6 +14,6 @@ appraise 'rails-5.1-stable' do
14
14
  gem 'rails', '~> 5.1.0'
15
15
  end
16
16
 
17
- appraise 'rails-5.2-rc1' do
18
- gem 'rails', '~> 5.2.0.rc1'
17
+ appraise 'rails-5.2.0' do
18
+ gem 'rails', '~> 5.2.0'
19
19
  end
data/README.md CHANGED
@@ -1,30 +1,28 @@
1
1
  # Devise Security
2
2
 
3
- [![Build Status](https://travis-ci.org/devise-security/devise-security.svg?branch=master)](https://travis-ci.org/devise-security/devise-security)
4
- [![Coverage Status](https://coveralls.io/repos/github/devise-security/devise-security/badge.svg?branch=master)](https://coveralls.io/github/devise-security/devise-security?branch=master)
5
- [![Maintainability](https://api.codeclimate.com/v1/badges/ace7cd003a0db8bffa5a/maintainability)](https://codeclimate.com/github/devise-security/devise-security/maintainability)
3
+ [![Build Status](https://travis-ci.org/devise-security/devise-security.svg?branch=master)](https://travis-ci.org/devise-security/devise-security)[![Coverage Status](https://coveralls.io/repos/github/devise-security/devise-security/badge.svg?branch=master)](https://coveralls.io/github/devise-security/devise-security?branch=master)[![Maintainability](https://api.codeclimate.com/v1/badges/ace7cd003a0db8bffa5a/maintainability)](https://codeclimate.com/github/devise-security/devise-security/maintainability)
6
4
 
7
5
  A [Devise](https://github.com/plataformatec/devise) extension to add additional security features required by modern web applications. Forked from [Devise Security Extension](https://github.com/phatworx/devise_security_extension)
8
6
 
9
7
  It is composed of 7 additional Devise modules:
10
8
 
11
- * `:password_expirable` - passwords will expire after a configured time (and will need an update). You will most likely want to use `:password_expirable` together with the `:password_archivable` module to [prevent the current expired password being reused](https://github.com/phatworx/devise_security_extension/issues/175) immediately as the new password.
12
- * `:secure_validatable` - better way to validate a model (email, stronger password validation). Don't use with Devise `:validatable` module!
13
- * `:password_archivable` - save used passwords in an `old_passwords` table for history checks (don't be able to use a formerly used password)
14
- * `:session_limitable` - ensures, that there is only one session usable per account at once
15
- * `:expirable` - expires a user account after x days of inactivity (default 90 days)
16
- * `:security_questionable` - as accessible substitution for captchas (security question with captcha fallback)
17
- * `:paranoid_verification` - admin can generate verification code that user needs to fill in otherwise he wont be able to use the application.
9
+ - `:password_expirable` - passwords will expire after a configured time (and will need to be changed by the user). You will most likely want to use `:password_expirable` together with the `:password_archivable` module to [prevent the current expired password being reused](https://github.com/phatworx/devise_security_extension/issues/175) immediately as the new password.
10
+ - `:secure_validatable` - better way to validate a model (email, stronger password validation). Don't use with Devise `:validatable` module!
11
+ - `:password_archivable` - save used passwords in an `old_passwords` table for history checks (don't be able to use a formerly used password)
12
+ - `:session_limitable` - ensures, that there is only one session usable per account at once
13
+ - `:expirable` - expires a user account after x days of inactivity (default 90 days)
14
+ - `:security_questionable` - as accessible substitution for captchas (security question with captcha fallback)
15
+ - `:paranoid_verification` - admin can generate verification code that user needs to fill in otherwise he wont be able to use the application.
18
16
 
19
17
  Configuration and database schema for each module below.
20
18
 
21
19
  ## Additional features
22
20
 
23
- * **captcha support** for `sign_up`, `sign_in`, `recover` and `unlock` (to make automated mass creation and brute forcing of accounts harder)
21
+ - **captcha support** for `sign_up`, `sign_in`, `recover` and `unlock` (to make automated mass creation and brute forcing of accounts harder)
24
22
 
25
23
  ## Getting started
26
24
 
27
- Devise Security works with Devise on Rails 4.1 onwards. You can add it to your Gemfile after you successfully set up Devise (see [Devise documentation](https://github.com/plataformatec/devise)) with:
25
+ Devise Security works with Devise on Rails 4.2 onwards. You can add it to your Gemfile after you successfully set up Devise (see [Devise documentation](https://github.com/plataformatec/devise)) with:
28
26
 
29
27
  ```ruby
30
28
  gem 'devise-security'
@@ -38,18 +36,21 @@ After you installed Devise Security you need to run the generator:
38
36
  rails generate devise_security:install
39
37
  ```
40
38
 
41
- The generator adds optional configurations to `config/initializers/devise-security.rb`. Enable
42
- the modules you wish to use in the initializer you are ready to add Devise Security modules on top of Devise modules to any of your Devise models:
39
+ The generator adds optional configurations to `config/initializers/devise-security.rb`. Enable the modules you wish to use in the initializer you are ready to add Devise Security modules on top of Devise modules to any of your Devise models:
43
40
 
44
41
  ```ruby
45
42
  devise :password_expirable, :secure_validatable, :password_archivable, :session_limitable, :expirable
46
43
  ```
47
44
 
48
- for `:secure_validatable` you need to add
45
+ ### E-mail Validation
49
46
 
50
- ```ruby
51
- gem 'rails_email_validator'
52
- ```
47
+ for `:secure_validatable` you need to have a way to validate an e-mail. There are multiple libraries that support this, and even a way built into Ruby!
48
+
49
+ [Ruby Constant](http://yogodoshi.com/ruby-already-has-its-own-regular-expression-to-validate-emails/)
50
+ * Note: This method would require a `email_validation` method to be defined in order to hook into the `validates` method defined here.
51
+ [email_address](https://github.com/afair/email_address) gem
52
+ [valid_email2](https://github.com/micke/valid_email2) gem
53
+ [rails_email_validator](https://github.com/phatworx/rails_email_validator) gem (deprecated)
53
54
 
54
55
  ## Configuration
55
56
 
@@ -58,11 +59,14 @@ Devise.setup do |config|
58
59
  # ==> Security Extension
59
60
  # Configure security extension for devise
60
61
 
61
- # Should the password expire (e.g 3.months)
62
- # config.expire_password_after = 3.months
62
+ # Password expires after a configurable time (in seconds).
63
+ # Or expire passwords on demand by setting this configuration to `true`
64
+ # Use `user.need_password_change!` to expire a password.
65
+ # Setting the configuration to `false` will completely disable expiration checks.
66
+ # config.expire_password_after = 3.months | true | false
63
67
 
64
- # Need 1 char of A-Z, a-z and 0-9
65
- # config.password_regex = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/
68
+ # Need 1 char each of: A-Z, a-z, 0-9, and a punctuation mark or symbol
69
+ # config.password_complexity = { digit: 1, lower: 1, symbol: 1, upper: 1 }
66
70
 
67
71
  # Number of old passwords in archive
68
72
  # config.password_archiving_count = 5
@@ -101,20 +105,26 @@ end
101
105
  ```
102
106
 
103
107
  ## Captcha-Support
108
+
104
109
  The captcha support depends on [EasyCaptcha](https://github.com/phatworx/easy_captcha). See further documentation there.
105
110
 
106
111
  ### Installation
107
112
 
108
113
  1. Add EasyCaptcha to your `Gemfile` with
114
+
109
115
  ```ruby
110
116
  gem 'easy_captcha'
111
117
  ```
112
- 2. Run the initializer
118
+
119
+ 1. Run the initializer
120
+
113
121
  ```ruby
114
122
  rails generate easy_captcha:install
115
123
  ```
116
- 3. Enable captcha - see "Configuration" of Devise Security above.
117
- 4. Add the captcha in the generated devise views for each controller you have activated
124
+
125
+ 1. Enable captcha - see "Configuration" of Devise Security above.
126
+ 1. Add the captcha in the generated devise views for each controller you have activated
127
+
118
128
  ```erb
119
129
  <p><%= captcha_tag %></p>
120
130
  <p><%= text_field_tag :captcha %></p>
@@ -122,9 +132,10 @@ rails generate easy_captcha:install
122
132
 
123
133
  ## Schema
124
134
 
125
- Note: Unlike Devise, devise-security does not currently support mongoid. Pull requests are welcome!
135
+ Note: Unlike Devise, devise-security does not currently support mongoid. Pull requests are welcome!
126
136
 
127
137
  ### Password expirable
138
+
128
139
  ```ruby
129
140
  create_table :the_resources do |t|
130
141
  # other devise fields
@@ -134,7 +145,10 @@ end
134
145
  add_index :the_resources, :password_changed_at
135
146
  ```
136
147
 
148
+ Note: setting `password_changed_at` to `nil` will require the user to change their password.
149
+
137
150
  ### Password archivable
151
+
138
152
  ```ruby
139
153
  create_table :old_passwords do |t|
140
154
  t.string :encrypted_password, null: false
@@ -147,6 +161,7 @@ add_index :old_passwords, [:password_archivable_type, :password_archivable_id],
147
161
  ```
148
162
 
149
163
  ### Session limitable
164
+
150
165
  ```ruby
151
166
  create_table :the_resources do |t|
152
167
  # other devise fields
@@ -156,6 +171,7 @@ end
156
171
  ```
157
172
 
158
173
  ### Expirable
174
+
159
175
  ```ruby
160
176
  create_table :the_resources do |t|
161
177
  # other devise fields
@@ -168,6 +184,7 @@ add_index :the_resources, :expired_at
168
184
  ```
169
185
 
170
186
  ### Paranoid verifiable
187
+
171
188
  ```ruby
172
189
  create_table :the_resources do |t|
173
190
  # other devise fields
@@ -180,7 +197,7 @@ add_index :the_resources, :paranoid_verification_code
180
197
  add_index :the_resources, :paranoid_verified_at
181
198
  ```
182
199
 
183
- [Documentation for Paranoid Verifiable module]( https://github.com/devise-security/devise-security/wiki/Paranoid-Verification)
200
+ [Documentation for Paranoid Verifiable module](https://github.com/devise-security/devise-security/wiki/Paranoid-Verification)
184
201
 
185
202
  ### Security questionable
186
203
 
@@ -207,7 +224,6 @@ SecurityQuestion.create! locale: :de, name: 'Was ist Ihr Lieblingstier?'
207
224
  SecurityQuestion.create! locale: :de, name: 'Was ist Ihr Lieblings-Reiseland?'
208
225
  ```
209
226
 
210
-
211
227
  ```ruby
212
228
  add_column :the_resources, :security_question_id, :integer
213
229
  add_column :the_resources, :security_question_answer, :string
@@ -226,42 +242,45 @@ end
226
242
 
227
243
  ## Requirements
228
244
 
229
- * Devise (https://github.com/plataformatec/devise)
230
- * Rails 4.1 onwards (http://github.com/rails/rails)
231
- * recommendations:
232
- * `autocomplete-off` (http://github.com/phatworx/autocomplete-off)
233
- * `easy_captcha` (http://github.com/phatworx/easy_captcha)
234
- * `rails_email_validator` (http://github.com/phatworx/rails_email_validator)
235
-
245
+ - Devise (<https://github.com/plataformatec/devise>)
246
+ - Rails 4.2 onwards (<http://github.com/rails/rails>)
247
+ - recommendations:
248
+ - `autocomplete-off` (<http://github.com/phatworx/autocomplete-off>)
249
+ - `easy_captcha` (<http://github.com/phatworx/easy_captcha>)
236
250
 
237
251
  ## Todo
238
252
 
239
- * see the github issues (feature requests)
253
+ - see the github issues (feature requests)
240
254
 
241
255
  ## History
242
- * 0.1 expire passwords
243
- * 0.2 strong password validation
244
- * 0.3 password archivable with validation
245
- * 0.4 captcha support for sign_up, sign_in, recover and unlock
246
- * 0.5 session_limitable module
247
- * 0.6 expirable module
248
- * 0.7 security questionable module for recover and unlock
249
- * 0.8 Support for Rails 4 (+ variety of patches)
250
- * 0.11 Support for Rails 5. Forked to allow project maintenance and features
256
+
257
+ - 0.1 expire passwords
258
+ - 0.2 strong password validation
259
+ - 0.3 password archivable with validation
260
+ - 0.4 captcha support for sign_up, sign_in, recover and unlock
261
+ - 0.5 session_limitable module
262
+ - 0.6 expirable module
263
+ - 0.7 security questionable module for recover and unlock
264
+ - 0.8 Support for Rails 4 (+ variety of patches)
265
+ - 0.11 Support for Rails 5. Forked to allow project maintenance and features
266
+
267
+ See also [Github Releases](https://github.com/devise-security/devise-security/releases)
251
268
 
252
269
  ## Maintainers
253
270
 
254
- * Nate Bird (https://github.com/natebird)
271
+ - Nate Bird (<https://github.com/natebird>)
272
+ - Kevin Olbrich (<http://github.com/olbrich>)
273
+ - Dillon Welch (<http://github.com/oniofchaos>)
255
274
 
256
275
  ## Contributing to devise-security
257
276
 
258
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
259
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
260
- * Fork the project
261
- * Start a feature/bugfix branch
262
- * Commit and push until you are happy with your contribution
263
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
264
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
277
+ - Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
278
+ - Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
279
+ - Fork the project
280
+ - Start a feature/bugfix branch
281
+ - Commit and push until you are happy with your contribution
282
+ - Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
283
+ - Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
265
284
 
266
285
  ## Copyright
267
286
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Devise::ParanoidVerificationCodeController < DeviseController
2
4
  skip_before_action :handle_paranoid_verification
3
5
  prepend_before_action :authenticate_scope!, only: [:show, :update]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Devise::PasswordExpiredController < DeviseController
2
4
  skip_before_action :handle_password_change
3
5
  before_action :skip_password_change, only: [:show, :update]
@@ -3,7 +3,19 @@ de:
3
3
  messages:
4
4
  taken_in_past: 'wurde bereits in der Vergangenheit verwendet!'
5
5
  equal_to_current_password: 'darf nicht dem aktuellen Passwort entsprechen!'
6
- password_format: 'müssen große, kleine Buchstaben und Ziffern enthalten'
6
+ password_complexity:
7
+ digit:
8
+ one: muss mindestens eine Nummer enthalten
9
+ other: muss mindestens %{count} Zahlen enthalten
10
+ lower:
11
+ one: muss mindestens eine Kleinbuchstabe enthalten
12
+ other: muss mindestens %{count} Kleinbuchstaben enthalten
13
+ symbol:
14
+ one: muss mindestens eine Satzzeichen enthalten
15
+ other: muss mindestens %{count} Satzzeichen enthalten
16
+ upper:
17
+ one: muss mindestens eine Großbuchstabe enthalten
18
+ other: muss mindestens %{count} Großbuchstaben enthalten
7
19
  devise:
8
20
  invalid_captcha: 'Die Captchaeingabe ist nicht gültig!'
9
21
  paranoid_verify:
@@ -3,7 +3,19 @@ en:
3
3
  messages:
4
4
  taken_in_past: 'was used previously.'
5
5
  equal_to_current_password: 'must be different than the current password.'
6
- password_format: 'must contain big, small letters and digits'
6
+ password_complexity:
7
+ digit:
8
+ one: must contain at least one digit
9
+ other: must contain at least %{count} numerals
10
+ lower:
11
+ one: must contain at least one lower-case letter
12
+ other: must contain at least %{count} lower-case letters
13
+ symbol:
14
+ one: must contain at least one punctuation mark or symbol
15
+ other: must contain at least %{count} puncutation marks or symbols
16
+ upper:
17
+ one: must contain at least one upper-case letter
18
+ other: must contain at least %{count} upper-case letters
7
19
  devise:
8
20
  invalid_captcha: 'The captcha input was invalid.'
9
21
  invalid_security_question: 'The security question answer was invalid.'