From e0614a8a6a9a389a71a0601f509d46ef4d9d72e8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 4 May 2011 17:57:12 +0000 Subject: [PATCH] keeping the old defaults to not break existing installs --- setup/inc/hook_config.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup/inc/hook_config.inc.php b/setup/inc/hook_config.inc.php index f286e33359..b25c681d6b 100644 --- a/setup/inc/hook_config.inc.php +++ b/setup/inc/hook_config.inc.php @@ -166,13 +166,17 @@ function passwdhashes($config,$return_hashes=false) { $hashes['ext_crypt'] = 'ext_crypt'; } + if(@defined('CRYPT_STD_DES') && CRYPT_STD_DES == 1) + { + $hashes['crypt'] = 'crypt'; + } $hashes += array( 'md5' => 'md5', 'plain' => 'plain', ); - return $return_hashes ? $hashes : _options_from($hashes, $config['ldap_encryption_type']); + return $return_hashes ? $hashes : _options_from($hashes, $config['ldap_encryption_type'] ? $config['ldap_encryption_type'] : 'crypt'); } function sql_passwdhashes($config,$return_hashes=false) @@ -206,7 +210,7 @@ function sql_passwdhashes($config,$return_hashes=false) 'plain' => 'plain', ); - return $return_hashes ? $hashes : _options_from($hashes, $config['sql_encryption_type']); + return $return_hashes ? $hashes : _options_from($hashes, $config['sql_encryption_type'] ? $config['sql_encryption_type'] : 'md5'); } /**