r35884 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35883‎ | r35884 | r35885 >
Date:21:01, 4 June 2008
Author:brion
Status:old
Tags:
Comment:
Revert r35880 for the moment:

First, it looks like it'll attempt to re-set passwords much more frequently than necessary, and by calling $user->setPassword() it will be re-setting the password on the global account as well.

Second, it can't accomplish the general goal of always setting the local password for autocreated local accounts, since they may be created when no plaintext password is available (eg from an open session, which has only session tokens available, not passwords).
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuthPlugin.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/CentralAuthPlugin.php
@@ -8,7 +8,6 @@
99 * central password or settings.
1010 */
1111 class CentralAuthPlugin extends AuthPlugin {
12 - private $passwords = array(); // Password of the user. Stored because of the AuthPlugin limitations.
1312
1413 /**
1514 * Check whether there exists a user account with the given name.
@@ -76,9 +75,6 @@
7776 return false;
7877 }
7978 }
80 - if( $passwordMatch ) {
81 - $this->passwords[$username] = $password;
82 - }
8379
8480 return $passwordMatch;
8581 }
@@ -115,9 +111,6 @@
116112 if ( $central->exists() && $central->isAttached() ) {
117113 $user->setEmail( $central->getEmail() );
118114 $user->mEmailAuthenticated = $central->getEmailAuthenticationTimestamp();
119 - if( isset( $this->passwords[$user->getName()] ) ) {
120 - $user->setPassword( $this->passwords[$user->getName()] );
121 - }
122115 $user->saveSettings();
123116 }
124117 return true;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r35880* Change user local password to a global one on login and account autocreatio...vasilievvv20:29, 4 June 2008

Status & tagging log