Commit 980f1a0
authored
Feat/password complexity (#1133)
This pull request introduces password strength validation using the
`devise_zxcvbn` gem and improves internationalization for
password-related messages. The most significant changes include adding
the new dependency, integrating the module into the user model, and
updating translations for password strength feedback in English,
Spanish, and French. Minor localization improvements and code comments
addressing registration issues are also included.
**Password Strength Validation Integration**
* Added `devise_zxcvbn` as a dependency in `better_together.gemspec` and
required it in `lib/better_together/engine.rb` to enable password
strength checking.
[[1]](diffhunk://#diff-24601cecbf8b67ba22917d400c4fc5c238e320bb1d4080343f1e83c323e1ad49R40)
[[2]](diffhunk://#diff-4d654c2606392ee71bcc9f10c2846596452c072e8412ccca13c49971ee48dd57R17)
* Integrated the `:zxcvbnable` module into the `User` model via Devise
to enforce strong password requirements.
**Internationalization and Localization**
* Added new `weak_password` validation messages in English
(`config/locales/en.yml`), Spanish (`config/locales/es.yml`), and French
(`config/locales/fr.yml`) to provide clear feedback when a password is
too weak.
[[1]](diffhunk://#diff-44438ce218f5287c58d0017f965d888715635d94280669896f75841fbd7b4cd7R1850-R1852)
[[2]](diffhunk://#diff-4bbf4ee302c9607c80408361708b8b9fde3ee7afc5b505bfd69d429dd433f915R1873-R1875)
[[3]](diffhunk://#diff-2c5ab6165f7efe573a84107e0e51102ad47cefb0c65629759d7458eee14326e7R1881-R1883)
* Added translations for "password" and corrected locale names in
Spanish and French files; also added Ukrainian as a supported locale.
[[1]](diffhunk://#diff-4bbf4ee302c9607c80408361708b8b9fde3ee7afc5b505bfd69d429dd433f915R412)
[[2]](diffhunk://#diff-2c5ab6165f7efe573a84107e0e51102ad47cefb0c65629759d7458eee14326e7R412)
[[3]](diffhunk://#diff-4bbf4ee302c9607c80408361708b8b9fde3ee7afc5b505bfd69d429dd433f915R2074)
[[4]](diffhunk://#diff-2c5ab6165f7efe573a84107e0e51102ad47cefb0c65629759d7458eee14326e7L2075-R2081)
**Code Comments and Registration Flow**
* Added a comment in the `User#person` method and a TODO block for
`weak_words` to highlight potential save issues during registration due
to automatic association building.
[[1]](diffhunk://#diff-f998d6bc00cf682534504b180b280e4f4d33f62aac154bffe2d05c4ea72eb0eeL44-R45)
[[2]](diffhunk://#diff-f998d6bc00cf682534504b180b280e4f4d33f62aac154bffe2d05c4ea72eb0eeR70-R76)File tree
49 files changed
+2802
-113
lines changed- app
- controllers/better_together/users
- models/better_together
- views/better_together/joatu
- offers
- requests
- config/locales
- lib/better_together
- spec
- controllers/better_together
- users
- features
- agreements
- devise
- invitations
- notifications
- mailers/better_together
- policies/better_together
- requests/better_together
- joatu
- users
- support
- better_together
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
49 files changed
+2802
-113
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
269 | 273 | | |
270 | 274 | | |
271 | 275 | | |
| |||
833 | 837 | | |
834 | 838 | | |
835 | 839 | | |
| 840 | + | |
836 | 841 | | |
837 | 842 | | |
838 | 843 | | |
| |||
Lines changed: 142 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 67 | + | |
| 68 | + | |
74 | 69 | | |
75 | 70 | | |
76 | 71 | | |
77 | | - | |
| 72 | + | |
78 | 73 | | |
79 | 74 | | |
80 | 75 | | |
| |||
87 | 82 | | |
88 | 83 | | |
89 | 84 | | |
| 85 | + | |
90 | 86 | | |
91 | | - | |
92 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
93 | 96 | | |
94 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
| |||
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
108 | 121 | | |
109 | 122 | | |
110 | 123 | | |
| |||
170 | 183 | | |
171 | 184 | | |
172 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
173 | 197 | | |
174 | | - | |
175 | | - | |
| 198 | + | |
176 | 199 | | |
| 200 | + | |
177 | 201 | | |
178 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
179 | 207 | | |
180 | 208 | | |
181 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
182 | 226 | | |
183 | 227 | | |
184 | 228 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
191 | 240 | | |
192 | 241 | | |
193 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
194 | 282 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
199 | 296 | | |
200 | 297 | | |
201 | 298 | | |
| |||
235 | 332 | | |
236 | 333 | | |
237 | 334 | | |
| 335 | + | |
| 336 | + | |
238 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
239 | 341 | | |
240 | 342 | | |
241 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
242 | 347 | | |
243 | 348 | | |
244 | 349 | | |
| |||
247 | 352 | | |
248 | 353 | | |
249 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
250 | 360 | | |
251 | 361 | | |
252 | 362 | | |
| 363 | + | |
253 | 364 | | |
254 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
255 | 370 | | |
256 | 371 | | |
257 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
0 commit comments