diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2012-04-26 18:23:31 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2012-04-26 18:23:31 +0200 |
commit | c4372dd38a4d109b4f3881ea63b667e33adbe503 (patch) | |
tree | e8e6dae1229a68c26b7a348c73dc0c8c77da97e5 /includes/User.php | |
parent | cf566324cfb218f0c7323d97d2a103bbb8d60ba4 (diff) |
Update to MediaWiki 1.18.3
Diffstat (limited to 'includes/User.php')
-rw-r--r-- | includes/User.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/User.php b/includes/User.php index 705fd291..af05926c 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3272,11 +3272,12 @@ class User { global $wgUserEmailConfirmationTokenExpiry; $now = time(); $expires = $now + $wgUserEmailConfirmationTokenExpiry; + $expiration = wfTimestamp( TS_MW, $expires ); $this->load(); $token = MWCryptRand::generateHex( 32 ); $hash = md5( $token ); $this->mEmailToken = $hash; - $this->mEmailTokenExpires = wfTimestamp( TS_MW, $expires ); + $this->mEmailTokenExpires = $expiration; return $token; } @@ -3863,7 +3864,7 @@ class User { } elseif ( $type == ':B:' ) { # Salted list( $salt, $realHash ) = explode( ':', substr( $hash, 3 ), 2 ); - return md5( $salt.'-'.md5( $password ) ) == $realHash; + return md5( $salt.'-'.md5( $password ) ) === $realHash; } else { # Old-style return self::oldCrypt( $password, $userId ) === $hash; |