[Mediawiki-l] Internal error when creating accounts by e-mail with $wgMinimalPasswordLength > 0

Reid Priedhorsky reid at umn.edu
Fri Aug 1 22:51:05 UTC 2008


Hi,

We are running MediaWiki 1.12. We can cause an "Internal Error" by using 
the following recipe.

1. Set $wgMinimalPasswordLength to 6.
2. Browse (as bureaucrat and sysop) to 
http://example.com/index.php?title=Special:Userlogin&type=signup
3. Enter a new username, e.g. "UserFoo".
4. Leave both password fields blank.
5. Enter a valid e-mail address in the e-mail field.
6. Click "by e-mail".

Expected behavior:

1. Get a page titled "Password sent".
2. Temporary password shows up at entered e-mail.

Actual behavior:

1. Get a page titled "Internal Error" and the following content:
 >
> #0 /export/web/sites01/mediawiki/cyclopath/includes/SpecialUserlogin.php(338): User->setPassword('-')
> #1 /export/web/sites01/mediawiki/cyclopath/includes/SpecialUserlogin.php(320): LoginForm->initUser(Object(User), false)
> #2 /export/web/sites01/mediawiki/cyclopath/includes/SpecialUserlogin.php(117): LoginForm->addNewAccountInternal()
> #3 /export/web/sites01/mediawiki/cyclopath/includes/SpecialUserlogin.php(96): LoginForm->addNewAccountMailPassword()
> #4 /export/web/sites01/mediawiki/cyclopath/includes/SpecialUserlogin.php(17): LoginForm->execute()
> #5 [internal function]: wfSpecialUserlogin(NULL, Object(SpecialPage))
> #6 /export/web/sites01/mediawiki/cyclopath/includes/SpecialPage.php(678): call_user_func('wfSpecialUserlo...', NULL, Object(SpecialPage))
> #7 /export/web/sites01/mediawiki/cyclopath/includes/SpecialPage.php(464): SpecialPage->execute(NULL)
> #8 /export/web/sites01/mediawiki/cyclopath/includes/Wiki.php(193): SpecialPage::executePath(Object(Title))
> #9 /export/web/sites01/mediawiki/cyclopath/includes/Wiki.php(45): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
> #10 /export/web/sites01/mediawiki/cyclopath/index.php(90): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
> #11 {main}

2. No password shows up at e-mail.

We do have a custom AuthPlugin but the backtrace above does not touch 
it. UserFoo is created in our external database, but going 
Special:Userlogin and clicking "E-mail password" complains that no such 
user exists.

A workaround seems to be to enter a dummy password of sufficient length, 
but this is a little annoying, particularly since I'm uncomfortable 
giving everyone the same dummy password.

Help? Is there something we can edit to fix this?

Thanks,

Reid



More information about the MediaWiki-l mailing list