converted from 1.4 to 1.5 schema
* (bug 9682) Revert PHP 5.1 dependency on warning suppression for SVN info
* (bug 5959) Anchors dropped from stub links
+* (bug 3348) Some additional weak password checks: password which is same
+ as username will now be rejected.
== Maintenance ==
*
* @param string $password
* @return bool
- * @static
*/
- static function isValidPassword( $password ) {
- global $wgMinimalPasswordLength;
+ function isValidPassword( $password ) {
+ global $wgMinimalPasswordLength, $wgContLang;
$result = null;
if( !wfRunHooks( 'isValidPassword', array( $password, &$result ) ) ) return $result;
- if ($result === false) return false;
- return (strlen( $password ) >= $wgMinimalPasswordLength);
+ if ($result === false) return false;
+ return (strlen( $password ) >= $wgMinimalPasswordLength) &&
+ ($wgContLang->lc( $password ) !== $wgContLang->lc( $this->mName ));
}
/**
'variantname-kk-cn' => 'kk-cn',
'variantname-kk' => 'kk',
-'passwordtooshort' => 'Your password is too short. It must have at least $1 characters.',
+'passwordtooshort' => 'Your password is invalid or too short. It must have at least $1 characters and be different from your username.',
# Metadata
'metadata' => 'Metadata',