summaryrefslogtreecommitdiff
path: root/www/admin/user/user.php.in
diff options
context:
space:
mode:
authorSascha Wilde <wilde@intevation.de>2007-01-10 15:59:58 (GMT)
committerSascha Wilde <wilde@intevation.de>2007-01-10 15:59:58 (GMT)
commite6cdea0f29df5382ad5967ab900224f161e37f1c (patch)
tree19658d2c5c8e933c9f4d91236f119fbd3fc07944 /www/admin/user/user.php.in
parentbe6d85b89882630b23401ecdf4f7a646a2e58234 (diff)
downloadkolab-webadmin-e6cdea0f29df5382ad5967ab900224f161e37f1c.tar.gz
Create SSHA (instead of plain SHA1) password hashes. (fixes kolab/issue1013)
Diffstat (limited to 'www/admin/user/user.php.in')
-rw-r--r--www/admin/user/user.php.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/www/admin/user/user.php.in b/www/admin/user/user.php.in
index 994fc76..ed7eda6 100644
--- a/www/admin/user/user.php.in
+++ b/www/admin/user/user.php.in
@@ -11,6 +11,7 @@ require_once('@kolab_php_module_prefix@admin/include/headers.php');
require_once('@kolab_php_module_prefix@admin/include/locale.php');
require_once('@kolab_php_module_prefix@admin/include/authenticate.php');
require_once('@kolab_php_module_prefix@admin/include/form.class.php');
+require_once('@kolab_php_module_prefix@admin/include/passwd.php');
/**** Functions ***/
function comment( $s ) {
@@ -491,8 +492,7 @@ switch( $action ) {
$ldap_object['cn'] = trim($_POST['givenname']).' '.$ldap_object['sn'];
$ldap_object['givenName'] = trim($_POST['givenname']);
if( !empty( $_POST['password_0'] ) ) {
- $ldap_object['userPassword'] = '{sha}'.base64_encode( pack('H*',
- sha1( $_POST['password_0'])));
+ $ldap_object['userPassword'] = ssha( $_POST['password_0'], gensalt());
if( $action == 'save' && $auth->dn() == $dn ) {
// We are editing our own password, let's update the session!
$auth->setPassword($_POST['password_0']);