MediaWiki Gotcha

While installing mediawiki, if you enter admin's password same as the admin username, it will not let you log in to the admin account!!!

After vexing on the problem for sometime here is what I uncovered.

There is a method called 'isValidPassword()' in 'User' class (in includes/User.php file) that has the following line which prevents the login

PHP:
  1. ($wgContLang->lc( $password ) !== $wgContLang->lc( $this->mName )

Ideally this method should also be called while installing mediawiki so that user is not allowed to set admin's password same as admin username.

Note: It appears that the bug was fixed on 5th June in revision 22759, see line 616

About Amit Badkas

Amit Badkas is Zend certified PHP5 and Zend Framework engineer, and has been working in SANIsoft for past 9 years, his present designation is 'Technical Manager'
No comments yet.

Leave a Reply