File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 // won't be locked out after failed login attempts;
2424 const TRUSTED_IPS = [];
2525
26+ // Minimum entropy level for a password to be acceptable.
27+ const MINIMUM_PASSWORD_ENTROPY = 15;
28+
2629 /**
2730 * The list is made up of entries from the following sources, and made all lower case:
2831 * - https://raw.githubusercontent.com/DavidWittman/wpxmlrpcbrute/master/wordlists/1000-most-common-passwords.txt
2932 * - https://nordpass.com/most-common-passwords-list/
3033 * - https://www.safetydetectives.com/blog/the-most-hacked-passwords-in-the-world/
3134 * - https://www.forbes.com/sites/daveywinder/2019/12/14/ranked-the-worlds-100-worst-passwords/
3235 */
33- const BANNEDPASSWORDS = [
36+ const BANNED_PASSWORDS = [
3437 '123456',
3538 'password',
3639 '12345678',
Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ private static function isExpired($token) {
8181 }
8282
8383 public static function validatePasswordStrength ($ password ) {
84- $ entropy = PasswordValidator::getEntropy ($ password , BANNEDPASSWORDS );
85- $ minimumEntropy = 50 ;
84+ $ entropy = PasswordValidator::getEntropy ($ password , BANNED_PASSWORDS );
85+ $ minimumEntropy = MINIMUM_PASSWORD_ENTROPY ;
8686 if ($ entropy < $ minimumEntropy ) {
8787 return false ;
8888 }
You can’t perform that action at this time.
0 commit comments