X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap-cgi.git;a=blobdiff_plain;f=update.cgi;h=5a59a3436be62c5bf7605b42668c977bab6ca954;hp=8e74b3e4a90408d45c098301b5de2ee06151e719;hb=315098762d694e291a67049a1f7fe73b929ed64b;hpb=f9609dae4f7fce6ca978c830f8e6311b7a94723c diff --git a/update.cgi b/update.cgi index 8e74b3e..5a59a34 100755 --- a/update.cgi +++ b/update.cgi @@ -13,7 +13,8 @@ use Digest::HMAC_SHA1 qw(hmac_sha1_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); my %config = &Util::ReadConfigFile; @@ -41,7 +42,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 +108,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 +130,17 @@ if (!($query->param('doupdate'))) { . '>male