From ea30faa00eca371a15653a6e2f8ad4ac8301e822 Mon Sep 17 00:00:00 2001 From: alec Date: Wed, 23 Nov 2011 08:38:42 +0000 Subject: - Save Samba password hashes in capital letters (#1488197) git-svn-id: https://svn.roundcube.net/trunk@5467 208e9e7b-5314-0410-a742-e7e81cd9613c --- plugins/password/drivers/ldap.php | 1 + plugins/password/drivers/ldap_simple.php | 1 + 2 files changed, 2 insertions(+) (limited to 'plugins/password/drivers') diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php index 3ea30a69c..e6450e5e1 100644 --- a/plugins/password/drivers/ldap.php +++ b/plugins/password/drivers/ldap.php @@ -272,6 +272,7 @@ function hashPassword( $passwordClear, $encodageType ) case 'samba': if (function_exists('hash')) { $cryptedPassword = hash('md4', rcube_charset_convert($passwordClear, RCMAIL_CHARSET, 'UTF-16LE')); + $cryptedPassword = strtoupper($cryptedPassword); } else { /* Your PHP install does not have the hash() function */ return false; diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php index 482b7e56f..2f51b7547 100644 --- a/plugins/password/drivers/ldap_simple.php +++ b/plugins/password/drivers/ldap_simple.php @@ -238,6 +238,7 @@ function ldap_simple_hash_password($password_clear, $encodage_type) case 'samba': if (function_exists('hash')) { $crypted_password = hash('md4', rcube_charset_convert($password_clear, RCMAIL_CHARSET, 'UTF-16LE')); + $crypted_password = strtoupper($crypted_password); } else { /* Your PHP install does not have the hash() function */ return false; -- cgit v1.2.3