0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/test/unit
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
..
adapters 🐛 Fixed post scheduling (#8976) 2017-09-05 19:23:11 +01:00
api Support for attribute-based permissions (#9025) 2017-09-26 18:06:14 +02:00
auth Removed defunct Ghost OAuth code (#9014) 2017-09-18 13:01:58 +01:00
config fix(config): cleanup absolute path config function (#8641) 2017-07-06 00:04:18 +02:00
controllers Group channel-handling code together 2017-10-25 18:48:47 +01:00
data/importer 🎨 Support LTS imports (#8498) 2017-06-04 11:53:00 +02:00
helpers Tests: Renamed unit/server_helpers to unit/helpers (#9145) 2017-10-19 12:02:21 +01:00
mail Improved log output for welcome email error (#9016) 2017-09-19 14:24:20 +01:00
metadata 🐛 Fixed author helper not returning the correct url (#9102) 2017-10-05 13:50:55 +02:00
middleware Always use our redirects utility (#9132) 2017-10-12 14:36:50 +02:00
models/base 🎨 change last_login to last_seen (#8259) 2017-04-05 20:45:55 +01:00
models_plugins Support filtering based on primary_tag (#9124) 2017-10-10 14:07:44 +02:00
permissions Permissions: minor refactors (#9104) 2017-10-05 21:01:34 +02:00
services Move xmlrpc & slack to services (#9179) 2017-10-25 15:27:56 +01:00
settings 🐛 fix settings cache (#8506) 2017-06-04 17:52:22 +07:00
sitemap 🙀 Image field naming & new img_url helper (#8364) 2017-04-24 18:21:47 +01:00
themes Custom post templates (#9073) 2017-10-10 13:36:35 +01:00
utils 🐛 Fixed internal links converting to absolute URLs (#9143) 2017-10-18 17:54:17 +01:00
admin_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
apps_filters_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
apps_spec.js Helper Proxy & single express-hbs instance (#8225) 2017-04-04 18:07:35 +02:00
errors_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
exporter_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
filters_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
ghost_sdk_spec.js 🐛 Fixed api url for the ghost sdk (#9013) 2017-09-18 16:28:22 +01:00
migration_fixture_utils_spec.js Custom post templates (#9073) 2017-10-10 13:36:35 +01:00
migration_spec.js Custom post templates (#9073) 2017-10-10 13:36:35 +01:00
rss_spec.js Simplify config for channels (#9158) 2017-10-24 17:18:35 +01:00
server_utils_spec.js Always use our redirects utility (#9132) 2017-10-12 14:36:50 +02:00
social-urls_spec.js
utils_pipeline_spec.js 💄 🐷 Test consistency (#8199) 2017-03-21 09:24:11 +01:00
validation_spec.js Improved password validation rules (#9171) 2017-10-26 11:01:24 +01:00