Last modified: 2010-05-15 15:59:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12988 - $wgMinimalPasswordLength setting does not allow account creation by e-mail
$wgMinimalPasswordLength setting does not allow account creation by e-mail
Product: MediaWiki
Classification: Unclassified
User login and signup (Other open bugs)
All All
: Normal blocker (vote)
: ---
Assigned To: Nobody - You can work on this!
: 15009 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2008-02-11 19:17 UTC by Andrea Matsunaga
Modified: 2010-05-15 15:59 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Andrea Matsunaga 2008-02-11 19:17:28 UTC
When setting $wgMinimalPasswordLength to some non-zero value and allowing an special category of users to create account for others "by e-mail", it is not possible to create new accounts as "Login error:Your password is invalid or too short. It must have at least X characters and be different from your username." is displayed.

The special user can type some password just to pass the validation, but it would be better if either the password is not validated  when account is being created "by e-mail" or the random password is generated and set before the validation.

For the first case, the fix can be the aaddition of the following if in function addNewAccountInternal, on line 263 of includes/SpecialUserlogin.php file:

                if ( $this->mPosted && !$this->mCreateaccountMail ) {
                        if ( !$u->isValidPassword( $this->mPassword ) ) {
                                $this->mainLoginForm( wfMsg( 'passwordtooshort', $wgMinimalPasswordLength ) );
                                        return false;
Comment 1 Brion Vibber 2008-02-25 22:09:34 UTC
Fixed in r31277.

A temporary value of '-' was used for the password during creation; this was immediately overwritten with a non-usable null password when the email reset was sent, but would still throw a fatal exception due to the minimal password length check.

Replacing this '-' value with null, a special password value reserved for setting non-valid logins, allows the account to be set up correctly without conflicting with the length minimum.
Comment 2 Emufarmers 2008-08-03 04:47:22 UTC
*** Bug 15009 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.