mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 15:49:06 +01:00
Fix for types other than md5 and crypt, e.g. SSHA where the the type is contained in the text of the password
This commit is contained in:
parent
1961bf2170
commit
23ac553d70
@ -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 ...
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user