From f88abd1a0041c498f0b67e2a9dc612be602c7ce1 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 6 Jun 2016 20:18:49 -0700 Subject: [PATCH] Issue #595 - Should fix corrupt cookie issue after password rehashing. --- e107_handlers/login.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e107_handlers/login.php b/e107_handlers/login.php index 615d53ea4..b0761ddc5 100644 --- a/e107_handlers/login.php +++ b/e107_handlers/login.php @@ -213,11 +213,13 @@ class userlogin { // May want to rewrite password using salted hash (or whatever the preferred method is) - $pass_result has the value to write // If login by email address also allowed, will have to write that value too // $sql->update('user',"`user_password` = '{$pass_result}' WHERE `user_id`=".intval($this->userData['user_id'])); - if($this->userMethods->rehashPassword($this->userData,$userpass)!==false) + $reHashedPass = $this->userMethods->rehashPassword($this->userData,$userpass); + if($reHashedPass !==false) { $log = e107::getLog(); $auditLog = "User Password ReHashed"; $log->user_audit(USER_AUDIT_LOGIN, $auditLog, $this->userData['user_id'], $this->userData['user_name']); + $this->userData['user_password'] = $reHashedPass; } }