From 6e4d8c65d25e6ef5dc4a92ae8fc917f822d9ebfd Mon Sep 17 00:00:00 2001 From: Martin Zobel-Helas Date: Fri, 9 Mar 2012 10:00:24 +0100 Subject: [PATCH] use Crypt::PasswdMD5 to create apache passwords Signed-off-by: Martin Zobel-Helas --- debian/control | 2 +- update.cgi | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 733ee32..a23c033 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Uploaders: Peter Palfrader , Stephen Gran , 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 diff --git a/update.cgi b/update.cgi index 4db9464..9f9b78c 100755 --- a/update.cgi +++ b/update.cgi @@ -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); } -- 2.20.1