X-Git-Url: https://git.treefish.org/fex.git/blobdiff_plain/e5c93609849bda051fff54b5d5265af5608c6c69..20160104:/cgi-bin/fuc?ds=inline diff --git a/cgi-bin/fuc b/cgi-bin/fuc index 661c897..4d7ee3c 100755 --- a/cgi-bin/fuc +++ b/cgi-bin/fuc @@ -8,6 +8,7 @@ BEGIN { ($ENV{PERLINIT}||'') =~ /(.+)/s and eval $1 } +use utf8; use Fcntl qw(:flock); use Digest::MD5 qw(md5_hex); @@ -74,7 +75,7 @@ foreach my $v (keys %PARAM) { $v =~ /^group$/i ? $group = checkchars('group',$vv): $v =~ /^ab$/i ? $ab = $vv: $v =~ /^gm$/i ? $gm = $vv: - $v =~ /^show$/i ? $tools = checkchars('parameter',$vv): + $v =~ /^show$/i ? $show = checkchars('parameter',$vv): $ESAC; } @@ -87,6 +88,30 @@ $user .= '@'.$mdomain if $mdomain and $user !~ /@/; $nomail = $comment if $comment =~ /NOMAIL|!#!/; +if ($show and $show eq 'tools') { + nvt_print( + "HTTP/1.1 302 Found", + "Location: /tools.html", + 'Expires: 0', + 'Content-Length: 0', + '' + ); + &reexec; + + if (open $tools,"$docdir/tools.html") { + while (<$tools>) { + while (/\$([\w_]+)\$/) { + my $var = $1; + my $env = $ENV{$var} || ''; + s/\$$var\$/$env/g; + }; + print; + } + } + exit; +} + + if ($akey) { # sid is not set with web browser @@ -154,7 +179,7 @@ if ($user and $id) { # empty POST? ==> back to foc if ($ENV{REQUEST_METHOD} eq 'POST' and not - ($subuser or $notify or $nid or $ssid or $group or $ab or $gm or $tools + ($subuser or $notify or $nid or $ssid or $group or $ab or $gm or $disclaimer or $encryption or $pubkey)) { nvt_print( @@ -181,31 +206,6 @@ if ($gm and not $group) { exit; } -if ($tools) { - pq(qq( - 'To use one of the following F*EX clients you must configure them after' - 'download:' - '

' - '' - ' ' - ' ' - ' ' - ' ' - '
F*EX server:$ENV{PROTO}://$ENV{HTTP_HOST}
Proxy:(your web proxy address, may be empty)
User:$user
Auth-ID:$id
' - )); - if (open $tools,"$docdir/tools.html") { - while (<$tools>) { - while (/\$([\w_]+)\$/) { - my $var = $1; - my $env = $ENV{$var} || ''; - s/\$$var\$/$env/g; - }; - print; - } - } - exit; -} - if ($group) { &handle_group; } @@ -924,7 +924,7 @@ sub notify_groupmember { '' 'to upload files to F*EX group "$group"' '' - 'See http://$ENV{HTTP_HOST}/ for more information about F*EX.' + 'See http://$ENV{HTTP_HOST}/index.html for more information about F*EX.' '' 'Questions? ==> F*EX admin: $admin' ));