Source

iredmail / iRedMail / patches / roundcube / ldap_simple.patch

Full commit
--- plugins/password/drivers/ldap_simple.php	2011-11-24 15:53:00.000000000 +0800
+++ /Users/zhb/ldap_simple.php	2011-12-31 00:44:35.000000000 +0800
@@ -216,7 +216,7 @@
 			}
 			break;
 		case 'ssha':
-			if (function_exists('mhash') && function_exists('mhash_keygen_s2k')) {
+			if (function_exists('mhash_keygen_s2k')) {
 				mt_srand((double) microtime() * 1000000 );
 				$salt = mhash_keygen_s2k(MHASH_SHA1, $password_clear, substr(pack('h*', md5(mt_rand())), 0, 8), 4);
 				$crypted_password = '{SSHA}' . base64_encode(mhash(MHASH_SHA1, $password_clear . $salt) . $salt);