MediaWiki versions:
1.40 – 1.42
$wgPasswordPolicy = [
'policies' => [
'bureaucrat' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'sysop' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'interface-admin' => [ // 1.32+
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'bot' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'default' => [
'MinimalPasswordLength' => [ 'value' => 8 , 'suggestChangeOnLogin' => true ], // 1.40+
'PasswordCannotBeSubstringInUsername' => [ // 1.35+
'value' => true ,
'suggestChangeOnLogin' => true
],
'PasswordCannotMatchDefaults' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.35+
'MaximalPasswordLength' => [ 'value' => 4096 , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordNotInCommonList' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.35+
],
],
'checks' => [
'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength' ,
'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin' ,
'PasswordCannotBeSubstringInUsername' =>
'PasswordPolicyChecks::checkPasswordCannotBeSubstringInUsername' , // 1.35+
'PasswordCannotMatchDefaults' => 'PasswordPolicyChecks::checkPasswordCannotMatchDefaults' , // 1.35+
'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength' ,
'PasswordNotInCommonList' => 'PasswordPolicyChecks::checkPasswordNotInCommonList' , // 1.35+
],
];
MediaWiki version:
≥ 1.37
$wgPasswordPolicy = [
'policies' => [
'bureaucrat' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'sysop' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'interface-admin' => [ // 1.32+
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'bot' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'default' => [
'MinimalPasswordLength' => [ 'value' => 1 , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordCannotBeSubstringInUsername' => [ // 1.35+
'value' => true ,
'suggestChangeOnLogin' => true
],
'PasswordCannotMatchDefaults' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.35+
'MaximalPasswordLength' => [ 'value' => 4096 , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordNotInCommonList' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.35+
],
],
'checks' => [
'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength' ,
'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin' ,
'PasswordCannotBeSubstringInUsername' =>
'PasswordPolicyChecks::checkPasswordCannotBeSubstringInUsername' , // 1.35+
'PasswordCannotMatchDefaults' => 'PasswordPolicyChecks::checkPasswordCannotMatchDefaults' , // 1.35+
'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength' ,
'PasswordNotInCommonList' => 'PasswordPolicyChecks::checkPasswordNotInCommonList' , // 1.35+
],
];
MediaWiki version:
≥ 1.36
$wgPasswordPolicy = [
'policies' => [
'bureaucrat' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'sysop' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'interface-admin' => [ // 1.32+
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'bot' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'default' => [
'MinimalPasswordLength' => [ 'value' => 1 , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordCannotMatchUsername' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordCannotBeSubstringInUsername' => [ // 1.35+
'value' => true ,
'suggestChangeOnLogin' => true
],
'PasswordCannotMatchDefaults' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.35+
'MaximalPasswordLength' => [ 'value' => 4096 , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordNotInCommonList' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.35+
],
],
'checks' => [
'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength' ,
'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin' ,
'PasswordCannotMatchUsername' => 'PasswordPolicyChecks::checkPasswordCannotMatchUsername' ,
'PasswordCannotBeSubstringInUsername' =>
'PasswordPolicyChecks::checkPasswordCannotBeSubstringInUsername' , // 1.35+
'PasswordCannotMatchDefaults' => 'PasswordPolicyChecks::checkPasswordCannotMatchDefaults' , // 1.35+
'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength' ,
'PasswordNotInCommonList' => 'PasswordPolicyChecks::checkPasswordNotInCommonList' , // 1.35+
],
];
$wgPasswordPolicy = [
'policies' => [
'bureaucrat' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'sysop' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'interface-admin' => [ // 1.32+
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'bot' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'default' => [
'MinimalPasswordLength' => [ 'value' => 1 , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordCannotMatchUsername' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordCannotBeSubstringInUsername' => [ // 1.35+
'value' => true ,
'suggestChangeOnLogin' => true
],
'PasswordCannotMatchDefaults' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.35+
'MaximalPasswordLength' => [ 'value' => 4096 , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordNotInCommonList' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.35+
],
],
'checks' => [
'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength' ,
'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin' ,
'PasswordCannotMatchUsername' => 'PasswordPolicyChecks::checkPasswordCannotMatchUsername' ,
'PasswordCannotBeSubstringInUsername' =>
'PasswordPolicyChecks::checkPasswordCannotBeSubstringInUsername' , // 1.35+
'PasswordCannotMatchBlacklist' => 'PasswordPolicyChecks::checkPasswordCannotMatchDefaults' , // 1.35
'PasswordCannotMatchDefaults' => 'PasswordPolicyChecks::checkPasswordCannotMatchDefaults' , // 1.35+
'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength' ,
'PasswordNotInLargeBlacklist' => 'PasswordPolicyChecks::checkPasswordNotInCommonList' , // 1.35
'PasswordNotInCommonList' => 'PasswordPolicyChecks::checkPasswordNotInCommonList' , // 1.35+
],
];
$wgPasswordPolicy = [
'policies' => [
'bureaucrat' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'sysop' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'interface-admin' => [ // 1.32+
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'bot' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
],
'default' => [
'MinimalPasswordLength' => [ 'value' => 1 , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordCannotMatchUsername' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordCannotMatchBlacklist' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.33+
'MaximalPasswordLength' => [ 'value' => 4096 , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordNotInLargeBlacklist' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.34+
],
],
'checks' => [
'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength' ,
'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin' ,
'PasswordCannotMatchUsername' => 'PasswordPolicyChecks::checkPasswordCannotMatchUsername' ,
'PasswordCannotMatchBlacklist' => 'PasswordPolicyChecks::checkPasswordCannotMatchBlacklist' ,
'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength' ,
'PasswordCannotBePopular' => 'PasswordPolicyChecks::checkPopularPasswordBlacklist' , // 1.27+
'PasswordNotInLargeBlacklist' => 'PasswordPolicyChecks::checkPasswordNotInLargeBlacklist' , // 1.33+
],
];
$wgPasswordPolicy = [
'policies' => [
'bureaucrat' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordNotInLargeBlacklist' => true , // 1.33
],
'sysop' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordNotInLargeBlacklist' => true , // 1.33
],
'interface-admin' => [ // 1.32+
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordNotInLargeBlacklist' => true , // 1.33
],
'bot' => [
'MinimalPasswordLength' => 10 , // 1.33+
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordNotInLargeBlacklist' => true , // 1.33
],
'default' => [
'MinimalPasswordLength' => [ 'value' => 1 , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordCannotMatchUsername' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.33+
'PasswordCannotMatchBlacklist' => [ 'value' => true , 'suggestChangeOnLogin' => true ], // 1.33+
'MaximalPasswordLength' => [ 'value' => 4096 , 'suggestChangeOnLogin' => true ], // 1.33+
],
],
'checks' => [
'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength' ,
'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin' ,
'PasswordCannotMatchUsername' => 'PasswordPolicyChecks::checkPasswordCannotMatchUsername' ,
'PasswordCannotMatchBlacklist' => 'PasswordPolicyChecks::checkPasswordCannotMatchBlacklist' ,
'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength' ,
'PasswordCannotBePopular' => 'PasswordPolicyChecks::checkPopularPasswordBlacklist' , // 1.27+
'PasswordNotInLargeBlacklist' => 'PasswordPolicyChecks::checkPasswordNotInLargeBlacklist' , // 1.33+
],
];
$wgPasswordPolicy = [
'policies' => [
'bureaucrat' => [
'MinimalPasswordLength' => 8 ,
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordCannotMatchUsername' => true ,
'PasswordCannotBePopular' => 25 , // 1.27+
],
'sysop' => [
'MinimalPasswordLength' => 8 ,
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordCannotMatchUsername' => true ,
'PasswordCannotBePopular' => 25 , // 1.27+
],
'interface-admin' => [ // 1.32+
'MinimalPasswordLength' => 8 ,
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordCannotMatchUsername' => true ,
'PasswordCannotBePopular' => 25 ,
],
'bot' => [
'MinimalPasswordLength' => 8 ,
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordCannotMatchUsername' => true ,
],
'default' => [
'MinimalPasswordLength' => 1 ,
'PasswordCannotMatchUsername' => true ,
'PasswordCannotMatchBlacklist' => true ,
'MaximalPasswordLength' => 4096 ,
],
],
'checks' => [
'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength' ,
'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin' ,
'PasswordCannotMatchUsername' => 'PasswordPolicyChecks::checkPasswordCannotMatchUsername' ,
'PasswordCannotMatchBlacklist' => 'PasswordPolicyChecks::checkPasswordCannotMatchBlacklist' ,
'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength' ,
'PasswordCannotBePopular' => 'PasswordPolicyChecks::checkPopularPasswordBlacklist' // 1.27+
],
];
MediaWiki versions:
1.27 – 1.31
$wgPasswordPolicy = [
'policies' => [
'bureaucrat' => [
'MinimalPasswordLength' => 8 ,
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordCannotMatchUsername' => true ,
'PasswordCannotBePopular' => 25 , // 1.27+
],
'sysop' => [
'MinimalPasswordLength' => 8 ,
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordCannotMatchUsername' => true ,
'PasswordCannotBePopular' => 25 , // 1.27+
],
'bot' => [
'MinimalPasswordLength' => 8 ,
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordCannotMatchUsername' => true ,
],
'default' => [
'MinimalPasswordLength' => 1 ,
'PasswordCannotMatchUsername' => true ,
'PasswordCannotMatchBlacklist' => true ,
'MaximalPasswordLength' => 4096 ,
],
],
'checks' => [
'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength' ,
'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin' ,
'PasswordCannotMatchUsername' => 'PasswordPolicyChecks::checkPasswordCannotMatchUsername' ,
'PasswordCannotMatchBlacklist' => 'PasswordPolicyChecks::checkPasswordCannotMatchBlacklist' ,
'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength' ,
'PasswordCannotBePopular' => 'PasswordPolicyChecks::checkPopularPasswordBlacklist' // 1.27+
],
];
$wgPasswordPolicy = array (
'policies' => array (
'bureaucrat' => array (
'MinimalPasswordLength' => 8 ,
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordCannotMatchUsername' => true ,
),
'sysop' => array (
'MinimalPasswordLength' => 8 ,
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordCannotMatchUsername' => true ,
),
'bot' => array (
'MinimalPasswordLength' => 8 ,
'MinimumPasswordLengthToLogin' => 1 ,
'PasswordCannotMatchUsername' => true ,
),
'default' => array (
'MinimalPasswordLength' => 1 ,
'PasswordCannotMatchUsername' => true ,
'PasswordCannotMatchBlacklist' => true ,
'MaximalPasswordLength' => 4096 ,
),
),
'checks' => array (
'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength' ,
'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin' ,
'PasswordCannotMatchUsername' => 'PasswordPolicyChecks::checkPasswordCannotMatchUsername' ,
'PasswordCannotMatchBlacklist' => 'PasswordPolicyChecks::checkPasswordCannotMatchBlacklist' ,
'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength' ,
),
);