r81240 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81239‎ | r81240 | r81241 >
Date:12:17, 31 January 2011
Author:reedy
Status:ok
Tags:
Comment:
Remove calls to wfEncryptPassword (bug 27401)
Modified paths:
  • /trunk/extensions/auth/GlobalAuth.php (modified) (history)

Diff [purge]

Index: trunk/extensions/auth/GlobalAuth.php
@@ -93,7 +93,7 @@
9494 $fname );
9595 while ( $row = $dbr->fetchObject( $res ) ) {
9696 if ( $row->user_wiki == $this->thiswiki || $row->user_wiki == '*' ) {
97 - if ( $row->user_password == wfEncryptPassword( $row->user_id, $password ) ) {
 97+ if ( $row->user_password == User::oldCrypt( $password, $row->user_id ) ) {
9898 $this->data =& $row;
9999 return true;
100100 }
@@ -153,7 +153,7 @@
154154 function setPassword( $password ) {
155155 $dbw = wfGetDB( DB_MASTER );
156156 $success = $dbw->update( $this->tablename,
157 - array( 'user_password' => wfEncryptPassword( $this->data->user_id, $password ) ),
 157+ array( 'user_password' => User::oldCrypt( $password, $this->data->user_id ) ),
158158 array( 'user_id' => $this->data->user_id,
159159 'user_wiki' => $this->data->user_wiki ),
160160 'GlobalAuth::setPassword' );
@@ -226,7 +226,7 @@
227227 return false;
228228 # The password matches one of the already existing accounts.
229229 # Allow creation of an account.
230 - if ( $row->user_password == wfEncryptPassword( $row->user_id, $password ) ) {
 230+ if ( $row->user_password == User::oldCrypt( $password, $row->user_id ) ) {
231231 $create = true;
232232 }
233233 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r813941.17: MFT r81026, r81116, r81155, r81201, r81204, r81205, r81220, r81235, r81...catrope15:33, 2 February 2011

Status & tagging log