X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=update.cgi;h=ddb8052be31984a74df35d58128d01b357e2fc4f;hb=69124a32dd2d4e722e04b7258457532f973e6f09;hp=ae0b6ce2289e93fc42c99464191b0ba8b687444c;hpb=449fb36b879fe6aca6347db51f1c00d4865144be;p=mirror%2Fuserdir-ldap-cgi.git diff --git a/update.cgi b/update.cgi index ae0b6ce..ddb8052 100755 --- a/update.cgi +++ b/update.cgi @@ -10,10 +10,13 @@ use strict vars; use CGI; use Data::UUID; use Digest::HMAC_SHA1 qw(hmac_sha1_hex); +use Digest::MD5 qw(md5_hex); use Util; use English; use URI::Escape; -use Net::LDAP qw(:all); +use Crypt::PasswdMD5; +use Net::LDAP qw(LDAP_SUCCESS LDAP_PROTOCOL_ERROR); +use Net::LDAP::Util qw(ldap_explode_dn); my %config = &Util::ReadConfigFile; @@ -41,7 +44,7 @@ sub DieHandler { $ldap->unbind if (defined($ldap)); } -$SIG{__DIE__} = \&DieHandler; +#$SIG{__DIE__} = \&DieHandler; $ldap = Net::LDAP->new($config{ldaphost}); &Util::UpgradeConnection($ldap) unless $config{usessl} eq 'False'; @@ -107,6 +110,16 @@ if (!($query->param('doupdate'))) { } else { $data{mailcallout} = ""; } + + $data{maildefaultoptions} ||= 'TRUE'; + + if ($data{maildefaultoptions} eq "TRUE") { + $data{maildefaultoptions} = " checked"; + } else { + $data{maildefaultoptions} = ""; + } + + $data{mailcontentinspectionaction} ||= 'reject'; $data{email} = CGI::escapeHTML(join(", ", @{$entry->{emailforward}})); @@ -119,10 +132,21 @@ if (!($query->param('doupdate'))) { . '>male