From 4674dd042ff5eee1fcab6fe8956b04c6e40f7b86 Mon Sep 17 00:00:00 2001 From: nuxsmin Date: Sun, 8 Feb 2015 21:23:58 +0100 Subject: [PATCH] Error on updating LDAP user's password. Salt was not been escaped. --- inc/users.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/users.class.php b/inc/users.class.php index dffb7b2a..862b4ff5 100644 --- a/inc/users.class.php +++ b/inc/users.class.php @@ -241,9 +241,9 @@ class SP_Users private static function makeUserPass($userPass) { $salt = SP_Crypt::makeHashSalt(); - $userPass = DB::escape(sha1($salt . DB::escape($userPass))); + $userPass = sha1($salt . $userPass); - return array('salt' => $salt, 'pass' => $userPass); + return array('salt' => DB::escape($salt), 'pass' => DB::escape($userPass)); } /**