From f26243a69d275a0fcd05bc337b1bc82b438d5367 Mon Sep 17 00:00:00 2001 From: matthiasgrimm <matthiasgrimm@users.sourceforge.net> Date: Sat, 7 Jan 2006 12:46:35 +0100 Subject: [PATCH] mysql class password encryption bugfix A syntax error in the checkpass() function prevented the module from using password encryption by the database. It always did the password encryption by itself - fixed. darcs-hash:20060107114635-7ef76-0eeee13b57844097e83f14d85372502e6b1ce10e.gz --- inc/auth/mysql.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php index f0dde6ae0..6d79c5430 100644 --- a/inc/auth/mysql.class.php +++ b/inc/auth/mysql.class.php @@ -67,9 +67,12 @@ class auth_mysql extends auth_basic { $sql = str_replace('%g',addslashes($this->defaultgroup),$sql); $result = $this->queryDB($sql); - if($result !== false && count($result) == 1) - $rc = $cnf['encryptPass'] ? true : auth_verifyPassword($pass,$result[0]['pass']); - + if($result !== false && count($result) == 1) { + if($this->cnf['encryptPass'] == 1) + $rc = true; + else + $rc = auth_verifyPassword($pass,$result[0]['pass']); + } $this->closeDB(); } return $rc; -- GitLab