use Crypt::PasswdMD5 to create apache passwords
authorMartin Zobel-Helas <zobel@debian.org>
Fri, 9 Mar 2012 09:00:24 +0000 (10:00 +0100)
committerMartin Zobel-Helas <zobel@debian.org>
Fri, 9 Mar 2012 09:00:24 +0000 (10:00 +0100)
Signed-off-by: Martin Zobel-Helas <zobel@debian.org>
debian/control
update.cgi

index 733ee32..a23c033 100644 (file)
@@ -8,7 +8,7 @@ Uploaders: Peter Palfrader <weasel@debian.org>, Stephen Gran <sgran@debian.org>,
 
 Package: userdir-ldap-cgi
 Architecture: all
 
 Package: userdir-ldap-cgi
 Architecture: all
-Depends: userdir-ldap, perl5, libnet-ldap-perl, libcrypt-blowfish-perl, gnupg (>= 1.0.3), libdate-manip-perl, liburi-perl, libio-socket-ssl-perl, libossp-uuid-perl, libdigest-hmac-perl, python, python-crack | python-cracklib, cracklib-runtime
+Depends: userdir-ldap, perl5, libnet-ldap-perl, libcrypt-blowfish-perl, gnupg (>= 1.0.3), libdate-manip-perl, liburi-perl, libio-socket-ssl-perl, libossp-uuid-perl, libdigest-hmac-perl, python, python-crack | python-cracklib, cracklib-runtime, libcrypt-passwdmd5-perl
 Recommends: wamerican, wamerican-large, wamerican-small, wbritish, wbritish-large, wbritish-small, wbulgarian, wcanadian, wcanadian-large, wcanadian-small, wcatalan, wdanish, wdutch, wfaroese, wfinnish, wfrench, wgalician-minimos, witalian, wngerman, wnorwegian, wogerman, wpolish, wspanish, wswedish, wswiss, wukrainian
 Replaces: userdir-ldap
 Description: CGI programs for the db.debian.org
 Recommends: wamerican, wamerican-large, wamerican-small, wbritish, wbritish-large, wbritish-small, wbulgarian, wcanadian, wcanadian-large, wcanadian-small, wcatalan, wdanish, wdutch, wfaroese, wfinnish, wfrench, wgalician-minimos, witalian, wngerman, wnorwegian, wogerman, wpolish, wspanish, wswedish, wswiss, wukrainian
 Replaces: userdir-ldap
 Description: CGI programs for the db.debian.org
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 Util;
 use English;
 use URI::Escape;
+use Crypt::PasswdMD5;
 use Net::LDAP qw(LDAP_SUCCESS LDAP_PROTOCOL_ERROR);
 
 my %config = &Util::ReadConfigFile;
 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
     }
 
     # 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);
   }  
     
     &Util::LDAPUpdate($ldap, $editdn, 'webPassword', $newwebpassword);
   }