0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00
ghost/core/test/functional/routes/api
Aileen Nowak c8cbbc4eb6 Improved password validation rules (#9171)
refs #9150 

- Moves the password length fn from `models/user` to `data/validation` where the other validator functions live.
- Added password validation rules. Password rules added:
   - Disallow obviously bad passwords: '1234567890', 'qwertyuiop', 'asdfghjkl;' and 'asdfghjklm' for example
   - Disallow passwords that contain the words 'password' or 'ghost'
   - Disallow passwords that match the user's email address
   - Disallow passwords that match the blog domain or blog title
   - Disallow passwords that include 50% or more of the same characters: 'aaaaaaaaaa', '1111111111' and 'ababababab' for example.
- Password validation returns an `Object` now, that includes an `isValid` and `message` property to differentiate between the two error messages (password too short or password insecure).
- Use a catch predicate in `api/authentication` on `passwordReset`, so the correct `ValidationError` will be thrown during the password reset flow rather then an `UnauthorizedError`.
- When in setup flow, the blog title is not available yet from `settingsCache`. We therefore supply it from the received form data in the user model `setup` method to have it accessible for the validation.
2017-10-26 11:01:24 +01:00
..
authentication_spec.js Improved password validation rules (#9171) 2017-10-26 11:01:24 +01:00
configuration_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
db_spec.js Tests: Sort out usage of content folder in tests (#9034) 2017-09-21 15:05:35 +01:00
error_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
notifications_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
posts_spec.js Prev & next post filtering, with primary tag support (#9141) 2017-10-13 15:44:39 +01:00
public_api_spec.js Prev & next post filtering, with primary tag support (#9141) 2017-10-13 15:44:39 +01:00
redirects_spec.js 🐛 Fixed missing cache invalidation header when uploading redirects (#9071) 2017-09-27 18:58:33 +01:00
settings_spec.js 🎨 Enabled Unsplash by default 2017-09-20 11:44:47 +01:00
slugs_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
spam_prevention_spec.js Increase minimum password length to 10 characters (#9152) 2017-10-18 17:45:41 +01:00
tags_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
themes_spec.js Custom post templates (#9073) 2017-10-10 13:36:35 +01:00
upload_icon_spec.js 🎨 Blog icon improvements (#8260) 2017-04-11 13:40:17 +02:00
upload_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
users_spec.js 🎨 User is not allowed to add/modify certain fields (#9053) 2017-09-28 13:59:42 +01:00