BEGIN { ($ENV{PERLINIT}||'') =~ /(.+)/s and eval $1 }
+use utf8;
use Fcntl qw(:flock);
use Digest::MD5 qw(md5_hex);
$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;
}
$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
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(
# 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(
exit;
}
-if ($tools) {
- pq(qq(
- 'To use one of the following F*EX clients you must configure them after'
- 'download:'
- '<p>'
- '<table border=1>'
- ' <tr><th align=left>F*EX server:<td><code>$ENV{PROTO}://$ENV{HTTP_HOST}</code></tr>'
- ' <tr><th align=left>Proxy:<td>(your web proxy address, may be empty)</tr>'
- ' <tr><th align=left>User:<td><code>$user</code></tr>'
- ' <tr><th align=left>Auth-ID:<td><code>$id</code></tr>'
- '</table>'
- ));
- 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;
}
'To: $otuser'
'Subject: Your upload URL'
'X-Mailer: F*EX'
+ 'Content-Type: text/plain; charset=utf-8'
+ 'Content-Transfer-Encoding: 8bit'
''
'This is an automatically generated e-mail.'
''
'Cc: $user'
'Subject: Your F*EX account on $server'
'X-Mailer: F*EX'
+ 'Content-Type: text/plain; charset=utf-8'
+ 'Content-Transfer-Encoding: 8bit'
''
'This is an automatically generated e-mail.'
''
''
'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'
));