0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
ghost/core/test/integration/model
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
..
base 🎨 settings inconsistency (#8381) 2017-04-24 18:41:00 +01:00
model_accesstoken_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_app-fields_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_app-settings_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_apps_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_invite_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_permissions_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_posts_spec.js 🐛 Fixed being able to store invalid date formats (#9090) 2017-10-04 09:56:09 +01:00
model_roles_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_settings_spec.js Site description fixture update (#8763) 2017-07-27 12:26:31 +04:00
model_tags_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
model_users_spec.js Improved password validation rules (#9171) 2017-10-26 11:01:24 +01:00