X-Git-Url: http://git.treefish.org/fex.git/blobdiff_plain/7fa382617fbaccc0ce522b2b3adbbee9db5ad227..e5c93609849bda051fff54b5d5265af5608c6c69:/cgi-bin/foc?ds=inline diff --git a/cgi-bin/foc b/cgi-bin/foc index e5eea41..daf83f3 100755 --- a/cgi-bin/foc +++ b/cgi-bin/foc @@ -5,14 +5,11 @@ # Author: Ulli Horlacher # -use CGI qw(:standard); -use CGI::Carp qw(fatalsToBrowser); +BEGIN { ($ENV{PERLINIT}||'') =~ /(.+)/s and eval $1 } + use Fcntl qw(:flock); use Digest::MD5 qw(md5_hex); -$CGI::LIST_CONTEXT_WARN = 0; -$CGI::LIST_CONTEXT_WARN = 0; - # add fex lib ($FEXLIB) = $ENV{FEXLIB} =~ /(.+)/; die "$0: no $FEXLIB\n" unless -d $FEXLIB; @@ -27,14 +24,16 @@ my $error = 'F*EX operation control ERROR'; chdir $spooldir or die "$spooldir - $!\n"; -$akeydir = "$spooldir/.akeys"; +$akeydir = "$spooldir/.akeys"; $user = $id = ''; # look for CGI parameters -foreach my $v (param) { - my $vv = param($v); - debuglog("Param: $v=\"$vv\""); - if ($v =~ /^akey$/i and $vv =~ /^(\w+)$/) { +our %PARAM; +&parse_parameters; +foreach my $v (keys %PARAM) { + my $vv = $PARAM{$v}; + # debuglog("Param: $v=\"$vv\""); + if ($v =~ /^akey$/i and $vv =~ /^(\w+)$/) { $akey = $1; } elsif ($v =~ /^(from|user)$/i) { $user = normalize_email($vv);