X-Git-Url: http://git.treefish.org/fex.git/blobdiff_plain/e60096926213ce02293a261254ff065cae44c1c8..20150826:/cgi-bin/fup?ds=sidebyside
diff --git a/cgi-bin/fup b/cgi-bin/fup
index b1e01e6..97624a0 100755
--- a/cgi-bin/fup
+++ b/cgi-bin/fup
@@ -37,7 +37,7 @@ our (@registration_hosts,@demo,@file_link_dirs);
our ($FEXHOME);
our ($spooldir,$durl,$tmpdir,@logdir,$logdir,$docdir,$hostname,$admin,$fra);
our ($keep_default,$recipient_quota,$sender_quota,$fex_yourself);
-our ($sendmail,$mdomain,$fop_auth,$mail_auth,$faillog);
+our ($sendmail,$mdomain,$fop_auth,$mail_auth,$faillog,$amdl);
our ($dkeydir,$ukeydir,$akeydir,$skeydir,$gkeydir,$xkeydir);
our ($MB,$DS);
our $RB; # read POST bytes (total)
@@ -57,7 +57,7 @@ my @header; # HTTP entity header
my $fileid; # file ID
my $captive;
my $muser; # main user fur sub or group user
-
+
# load common code, local config: $FEXLIB/fex.ph
require "$FEXLIB/fex.pp";
@@ -66,7 +66,7 @@ our ($info_1,$info_2,$info_login);
$locale = $ENV{LOCALE} || 'english';
foreach (
- "/var/lib/fex/locale/$locale/lib/fup.pl",
+ "/var/lib/fex/locale/$locale/lib/fup.pl",
"$FEXLIB/fup.pl",
) {
if (-f) {
@@ -129,7 +129,7 @@ if ($from and $id_forgotten and $mail_authid and not ($fop_auth or $nomail)) {
# public recipients? (needs no auth-ID for sender)
if ($to and $id and $id eq 'PUBLIC' and @public_recipients) {
-
+
unless ($from) {
http_die("missing sender e-mail address");
}
@@ -146,12 +146,12 @@ if ($to and $id and $id eq 'PUBLIC' and @public_recipients) {
}
# anonymous upload from enabled IP?
-if ($from =~ /^anonymous@/ and
+if ($from =~ /^anonymous@/ and
@anonymous_upload and ipin($ra,@anonymous_upload)) {
$id = $rid = $anonymous = 'anonymous';
if ($to =~ /^anonymous/) {
@to = ($to);
- $autodelete{$to} = $autodelete = 'NO';
+ $autodelete{$to} = $autodelete = 'NO';
}
$nomail = $anonymous;
}
@@ -161,7 +161,7 @@ $comment = 'NOMAIL' if $nomail and not $comment;
# one time token
if ($okey) {
$to = "@to" or http_die("no recipient specified");
- $from = readlink "$to/\@OKEY/$okey"
+ $from = readlink "$to/\@OKEY/$okey"
or http_die("no upload key \"$okey
\" - ".
"request another one from $to
");
$from = untaint($from);
@@ -252,12 +252,12 @@ if ($akey and $dkey and $command eq 'COPY') {
http_die("File not found");
}
if (-e "$to/$to/$file/data") {
- http_die("File $file already exists in your outgoing spool")
- if (readlink("$to/$to/$file/id")||$to) ne
+ http_die("File $file already exists in your outgoing spool")
+ if (readlink("$to/$to/$file/id")||$to) ne
(readlink("$to/$from/$file/id")||$from);
} else {
mkdirp("$to/$to/$file");
- link "$to/$from/$file/data","$to/$to/$file/data"
+ link "$to/$from/$file/data","$to/$to/$file/data"
or http_die("cannot link to $to/$to/$file/data - $!\n");
copy("$to/$from/$file/filename","$to/$to/$file/filename");
copy("$to/$from/$file/id","$to/$to/$file/id");
@@ -302,7 +302,7 @@ if ($akey and $dkey and $command eq 'DELETE') {
""
);
&reexec;
- } else {
+ } else {
my $s = $!;
http_header('404 Not Found');
print html_header($head);
@@ -315,7 +315,7 @@ if ($akey and $dkey and $command eq 'DELETE') {
# special commands
if (($from and $id and $rid eq $id or $gkey or $skey) and $command) {
-
+
if ($command eq 'CHECKQUOTA') {
http_die("illegal command \"$command\"") if $public or $anonymous;
nvt_print('HTTP/1.1 204 OK');
@@ -390,9 +390,9 @@ if (($from and $id and $rid eq $id or $gkey or $skey) and $command) {
$filename = <$file>;
close $file;
}
- if ($filename and length $filename) {
+ if ($filename and length $filename) {
$filename = html_quote($filename);
- } else {
+ } else {
$filename = '???';
}
if (open $file,'<',"$file/comment") {
@@ -401,7 +401,7 @@ if (($from and $id and $rid eq $id or $gkey or $skey) and $command) {
}
my $rkeep = untaint(readlink "$file/keep"||$keep_default)
- int((time-mtime("$file/filename"))/$DS);
- if ($comment =~ /NOMAIL/ or
+ if ($comment =~ /NOMAIL/ or
(readlink "$to/\@NOTIFICATION"||'') =~ /^no/i) {
printf "%8s MB [%s d] %s/%s/%s\n",
$size,
@@ -416,7 +416,7 @@ if (($from and $id and $rid eq $id or $gkey or $skey) and $command) {
untaint("/fup?akey=$akey&dkey=$dkey&command=RENOTIFY"),
$filename,
$comment ? qq' "$comment"' : '',
- $file eq $nfile ?
+ $file eq $nfile ?
" → notification e-mail has been resent" :
"";
}
@@ -428,7 +428,7 @@ if (($from and $id and $rid eq $id or $gkey or $skey) and $command) {
'