https://github.com/born05/craft-enforcepassword
Craft plugin for incrementally enforced new and secure passwords.
https://github.com/born05/craft-enforcepassword
craftcms craftcms-plugin security
Last synced: about 1 year ago
JSON representation
Craft plugin for incrementally enforced new and secure passwords.
- Host: GitHub
- URL: https://github.com/born05/craft-enforcepassword
- Owner: born05
- License: mit
- Created: 2019-01-18T10:57:57.000Z (over 7 years ago)
- Default Branch: craft4
- Last Pushed: 2024-03-29T15:09:20.000Z (about 2 years ago)
- Last Synced: 2025-03-24T18:46:04.202Z (over 1 year ago)
- Topics: craftcms, craftcms-plugin, security
- Language: PHP
- Homepage:
- Size: 40 KB
- Stars: 5
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Craft Enforce Password plugin
Incrementally enforces a new and secure password not matching the last 5 passwords.
Stores password history in a database table.
Validates passwords by the following:
- Minimal length
- Maximum length
- At least 1 uppercase character
- At least 1 lowercase character
- At least 1 digit
- At least 1 symbol
- Can't match username or email
- Different from previous passwords
## Config
Create a `config/enforce-password.php` with the following contents:
```php
16,
'passwordMaxLength' => 255,
'passwordHistoryLimit' => 5, // Number of passwords kept in history, set to 0 to disable this feature
'passwordMaxLifetime' => 90, // Number of days a password can be used
'enforceUppercase' => true, // Min 1 uppercase letter
'enforceLowercase' => true, // Min 1 lowercase letter
'enforceDigit' => true, // Min 1 digit
'enforceSymbol' => true, // Min 1 symbol
];
```
## Commandline usage
```sh
craft enforce-password/default
```
## License
Copyright © [Born05](https://www.born05.com/)
See [license](https://github.com/born05/craft-enforcepassword/blob/master/LICENSE.md)