Extension:EnforceStrongPassword

What can this extension do?
This extension lets you set additional requirements for passwords. (1 number, 1 capital, 1 'normal' letter etc.)

Usage
Note that all passwords are checked, also the ones your users will use to login. If you have users in place that already have a password set that does NOT meet the requirements, they will be unable to login. You might want to change the MediaWiki:Passwordtooshort message to reflect the additional password requirements.

Installation
A hook must be added to User->isValidPassword (Patch has been submitted to bugzilla and has been applied for MW 1.10 in 20195) Change includes/User.php->isValidPassword to:

Parameters
None

Changes to LocalSettings.php
Add this:

Code
Save this in: extensions/StrongPassword.php =$wgMinimalPasswordLength // at least xx chars      && strlen($password)<17 // at most 16 chars      && preg_match('`[A-Z]`',$password) // at least one upper case      && preg_match('`[a-z]`',$password) // at least one lower case      && preg_match('`[0-9]`',$password) // at least one digit      ){ // valid $return = true; }else{ // not valid $return = false; }   // This hook REPLACES the original code. return false; } ?>