r1531 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r1530‎ | r1531 | r1532 >
Date:03:10, 8 August 2003
Author:vibber
Status:old
Tags:
Comment:
add wgPasswordSalt option, set to false for compatibility with old passwords in user table
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -282,7 +282,11 @@
283283
284284 function addSalt( $p )
285285 {
286 - return md5( "{$this->mId}-{$p}" );
 286+ global $wgPasswordSalt;
 287+ if($wgPasswordSalt)
 288+ return md5( "{$this->mId}-{$p}" );
 289+ else
 290+ return $p;
287291 }
288292
289293 function encryptPassword( $p )
Index: trunk/phase3/includes/DefaultSettings.php
@@ -121,6 +121,8 @@
122122 # Requires zlib support enabled in PHP.
123123 $wgUseGzip = false;
124124
 125+$wgPasswordSalt = true; # For compatibility with old installations set to false
 126+
125127 # Which namespaces should support subpages?
126128 # See Language.php for a list of namespaces.
127129 #

Status & tagging log