X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap-cgi.git;a=blobdiff_plain;f=update.cgi;h=c264eaf72aa9d0c9cdd97db3e89b41a13658f1c2;hp=f78a7ebeae7df753610e759db64fb08ef9036f6b;hb=5cea731d1b6f9504bd695fd2f201761c35f71a2c;hpb=00a6b3538e567017f85d7e92174d15e248133bf0 diff --git a/update.cgi b/update.cgi index f78a7eb..c264eaf 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,6 +132,17 @@ if (!($query->param('doupdate'))) { . '>male