From 23ac553d70d39b7e00ecf6b6c24747905381729a Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Tue, 20 Jun 2006 09:50:00 +0000 Subject: [PATCH] Fix for types other than md5 and crypt, e.g. SSHA where the the type is contained in the text of the password --- phpgwapi/inc/class.auth.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.auth.inc.php b/phpgwapi/inc/class.auth.inc.php index 47941e779c..ca881379e0 100644 --- a/phpgwapi/inc/class.auth.inc.php +++ b/phpgwapi/inc/class.auth.inc.php @@ -72,7 +72,7 @@ } /** - * compagres an encrypted password + * compares an encrypted password * * encryption type set in setup and calls the appropriate encryption functions * @@ -84,6 +84,7 @@ function compare_password($cleartext,$encrypted,$type,$username='') { // allow to specify the hash type to prefix the hash, to easy migrate passwords from ldap + $saved_enc = $encrypted; if (preg_match('/^\\{([a-z_5]+)\\}(.+)$/i',$encrypted,$matches)) { $type = strtolower($matches[1]); @@ -97,6 +98,8 @@ case 'crypt': // nothing to do break; + default: + $encrypted = $saved_enc; // ToDo: the others ... } }