born05 / craft-enforcepassword
Incrementally enforced new and secure passwords.
Installs: 43 041
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 8
Forks: 1
Open Issues: 0
Type:craft-plugin
Requires
- php: ^8.0.2
- craftcms/cms: ^4.0.0-alpha|^5.0.0-beta.1
This package is auto-updated.
Last update: 2024-10-29 16:23:31 UTC
README
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 return [ 'passwordMinLength' => 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
craft enforce-password/default
License
Copyright © Born05
See license