X-Git-Url: https://git.treefish.org/fex.git/blobdiff_plain/e5c93609849bda051fff54b5d5265af5608c6c69..cdeb354c4dbb11b683f9f8c5db2861f3dc572c61:/cgi-bin/fuc diff --git a/cgi-bin/fuc b/cgi-bin/fuc index 661c897..897fd69 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 @@ -110,7 +135,7 @@ if ($akey) { if ($user and $akey and $qs and $qs =~ /info=(.+?)&skey=(.+)/) { $subuser = $1; $skey = $2; - notify_subuser($user,$subuser,"$fup?skey=$skey",$comment); + notify_subuser($user,$subuser,"$fup?skey=$skey#$user",$comment); http_header("200 OK"); print html_header($head); pq(qq( @@ -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 |