One of the followups from http://www.mediawiki.org/wiki/Requests_for_comment/Passwords was an RFC for setting password policies by group.
The current weak password policy was also brought up by iSEC (iSEC-WMF1214-2) during their audit of MediaWiki. They recommend,
Passwords should:
- be a minimum of eight characters long
- contain at least one of each of the following:
- an uppercase letter
- a lowercase letter
- a number
- a special character
- be different than a user's username
- implement a blacklist of passwords that the user cannot use. (e.g., 123456 , password , pass-word123 , qwerty1! , etc.)
For MediaWiki, I think we should implement setting a policy that defines,
- Minimum length to set
- Minimum length to login
- Minimum number of uppercase, lowercase, numbers, symbols
- Cannot match username
- Cannot be in dictionary, for some defined dictionary list
We'll define a default policy that is equivalent to the checks in User::checkPasswordValidity. For each group that a user belongs to, if that group has a defined password policy, the effective policy is the maximum of each element.