MediaWiki REL1_28
|
Functions to check passwords against a policy requirement. More...
Static Public Member Functions | |
static | checkMaximalPasswordLength ( $policyVal, User $user, $password) |
Check password is shorter than maximum, fatal. | |
static | checkMinimalPasswordLength ( $policyVal, User $user, $password) |
Check password is longer than minimum, not fatal. | |
static | checkMinimumPasswordLengthToLogin ( $policyVal, User $user, $password) |
Check password is longer than minimum, fatal. | |
static | checkPasswordCannotMatchBlacklist ( $policyVal, User $user, $password) |
Check if username and password are on a blacklist. | |
static | checkPasswordCannotMatchUsername ( $policyVal, User $user, $password) |
Check if username and password match. | |
static | checkPopularPasswordBlacklist ( $policyVal, User $user, $password) |
Ensure that password isn't in top X most popular passwords. | |
Functions to check passwords against a policy requirement.
Definition at line 29 of file PasswordPolicyChecks.php.
|
static |
Check password is shorter than maximum, fatal.
int | $policyVal | maximum length |
User | $user | |
string | $password |
Definition at line 68 of file PasswordPolicyChecks.php.
References $status.
Referenced by PasswordPolicyChecksTest\testCheckMaximalPasswordLength().
|
static |
Check password is longer than minimum, not fatal.
int | $policyVal | minimal length |
User | $user | |
string | $password |
Definition at line 38 of file PasswordPolicyChecks.php.
References $status.
Referenced by PasswordPolicyChecksTest\testCheckMinimalPasswordLength().
|
static |
Check password is longer than minimum, fatal.
int | $policyVal | minimal length |
User | $user | |
string | $password |
Definition at line 53 of file PasswordPolicyChecks.php.
References $status.
Referenced by PasswordPolicyChecksTest\testCheckMinimumPasswordLengthToLogin().
|
static |
Check if username and password are on a blacklist.
bool | $policyVal | true to force compliance. |
User | $user | |
string | $password |
Definition at line 100 of file PasswordPolicyChecks.php.
References $status, $user, and $username.
Referenced by PasswordPolicyChecksTest\testCheckPasswordCannotMatchBlacklist().
|
static |
Check if username and password match.
bool | $policyVal | true to force compliance. |
User | $user | |
string | $password |
Definition at line 83 of file PasswordPolicyChecks.php.
References $status, $user, $username, $wgContLang, and global.
Referenced by PasswordPolicyChecksTest\testCheckPasswordCannotMatchUsername().
|
static |
Ensure that password isn't in top X most popular passwords.
int | $policyVal | Cut off to use. Will automatically shrink to the max supported for error messages if set to more than max number of passwords on file, so you can use the PHP_INT_MAX constant here safely. |
User | $user | |
string | $password |
Definition at line 132 of file PasswordPolicyChecks.php.
References $res, $status, $wgPopularPasswordFile, $wgSitename, and global.