MediaWiki
1.30.2
|
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. More... | |
static | checkMinimalPasswordLength ( $policyVal, User $user, $password) |
Check password is longer than minimum, not fatal. More... | |
static | checkMinimumPasswordLengthToLogin ( $policyVal, User $user, $password) |
Check password is longer than minimum, fatal. More... | |
static | checkPasswordCannotMatchBlacklist ( $policyVal, User $user, $password) |
Check if username and password are on a blacklist. More... | |
static | checkPasswordCannotMatchUsername ( $policyVal, User $user, $password) |
Check if username and password match. More... | |
static | checkPopularPasswordBlacklist ( $policyVal, User $user, $password) |
Ensure that password isn't in top X most popular passwords. More... | |
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 StatusValue\newGood().
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 StatusValue\newGood().
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 StatusValue\newGood().
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 $user, $username, and StatusValue\newGood().
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 $user, $username, $wgContLang, global, and StatusValue\newGood().
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, $wgPopularPasswordFile, $wgSitename, Language\factory(), global, StatusValue\newGood(), and Makefile\open.
Referenced by PasswordPolicyChecksTest\testCheckPopularPasswordBlacklist().