Page MenuHomePhabricator

Incorrect login message when using AuthPlugin
Closed, ResolvedPublic

Description

When using AuthPlugin and entering an existing username with a wrong password,
MediaWiki responds with an error message stating that the given username does
not exist. This is incorrect and confusing.

Patch to fix it:

  • SpecialUserlogin.php.orig Wed Mar 2 12:38:07 2005

+++ SpecialUserlogin.php Wed Mar 2 12:42:50 2005
@@ -248,10 +248,14 @@

    • automatically create a new account for users that
    • are externally defined but have not yet logged in. */
  • if( $wgAuth->autoCreate() &&
  • $wgAuth->userExists( $u->getName() ) &&
  • $wgAuth->authenticate( $u->getName(),

$this->mPassword ) ) {

  • $u =& $this->initUser( $u );

+ if( $wgAuth->autoCreate() && $wgAuth->userExists(
$u->getName() ) ) {
+ if( $wgAuth->authenticate( $u->getName(),
$this->mPassword ) ) {
+ $u =& $this->initUser( $u );
+ }
+ else {
+ $this->mainLoginForm( wfMsg(
'wrongpassword' ) );
+ return;
+ }

} else {
        $this->mainLoginForm( wfMsg( 'nosuchuser',

$u->getName() ) );

return;

Version: 1.4.x
Severity: minor

Details

Reference
bz1617

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 8:16 PM
bzimport set Reference to bz1617.
bzimport added a subscriber: Unknown Object (MLST).

Patch to fix the bug

The non munged version...

Attached: