X-Git-Url: https://git.treefish.org/fex.git/blobdiff_plain/7fa382617fbaccc0ce522b2b3adbbee9db5ad227..c65ee6f7429eff9a7f58aad7c0aec858ad473092:/cgi-bin/foc diff --git a/cgi-bin/foc b/cgi-bin/foc index e5eea41..7a180a6 100755 --- a/cgi-bin/foc +++ b/cgi-bin/foc @@ -5,14 +5,12 @@ # Author: Ulli Horlacher # -use CGI qw(:standard); -use CGI::Carp qw(fatalsToBrowser); +BEGIN { ($ENV{PERLINIT}||'') =~ /(.+)/s and eval $1 } + +use utf8; 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 +25,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); @@ -86,7 +86,15 @@ if ($user and $id) { # authorized login URL my $url = "$ENV{PROTO}://$ENV{HTTP_HOST}/fup/".b64("from=$user&id=$id"); pq(qq( - '

for user $user

' + '' + '

for user $user

' '' )); ($quota,$du) = check_sender_quota($user); @@ -120,7 +128,7 @@ if ($user and $id) { ' ' ' ' ' ' - ' Change your auth-ID to' + ' Change your auth-ID to' ' ' ' ' ));