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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14988, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12988 - $wgMinimalPasswordLength setting does not allow account creation by e-mail
$wgMinimalPasswordLength setting does not allow account creation by e-mail
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User login and signup (Other open bugs)
1.11.x
All All
: Normal blocker (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 15009 (view as bug list)
Depends on:
Blocks:
  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: ---


Attachments

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.


Navigation
Links