use Crypt::PasswdMD5 to create apache passwords
[mirror/userdir-ldap-cgi.git] / update.cgi
index 4db9464..9f9b78c 100755 (executable)
@@ -13,6 +13,7 @@ use Digest::HMAC_SHA1 qw(hmac_sha1_hex);
 use Util;
 use English;
 use URI::Escape;
+use Crypt::PasswdMD5;
 use Net::LDAP qw(LDAP_SUCCESS LDAP_PROTOCOL_ERROR);
 
 my %config = &Util::ReadConfigFile;
@@ -248,7 +249,7 @@ if (!($query->param('doupdate'))) {
     }
 
     # create a md5 crypted password
-    $newwebpassword = crypt($query->param('newwebpass'), &Util::CreateCryptSalt(1));
+    $newwebpassword = apache_md5_crypt($query->param('newwebpass'), &Util::CreateCryptSalt(1));
     
     &Util::LDAPUpdate($ldap, $editdn, 'webPassword', $newwebpassword);
   }