Fix indendation in http/upload.cgi

This commit is contained in:
qorg11 2020-07-01 17:50:58 +02:00
parent 47312a4d7c
commit f5967c88c0
Signed by: qorg11
GPG Key ID: 343FC20A4ACA62B9
1 changed files with 21 additions and 20 deletions

View File

@ -57,31 +57,32 @@ $filename = $string . "." . $extension;
my $allowed_extension = 1; my $allowed_extension = 1;
foreach(@not_allowed_extensions) foreach(@not_allowed_extensions)
{ {
if($filename =~ /\.$_$/i) if($filename =~ /\.$_$/i)
{ {
$allowed_extension = 0; $allowed_extension = 0;
last; last;
} }
} }
if($allowed_extension) if($allowed_extension)
{
open(FILE,">$upload_dir/$filename");
binmode(FILE);
while(<$upload_filehandle>)
{ {
print FILE;
open(FILE,">$upload_dir/$filename");
binmode(FILE);
while(<$upload_filehandle>)
{
print FILE;
}
close FILE;
print $ENV{HTTP_REFERER} . "$upload_dir$filename";
} }
close FILE; else
{
print $ENV{HTTP_REFERER} . "$upload_dir$filename"; print "The file extension .$extension is not allowed in this instance.";
}
else {
print "The file extension .$extension is not allowed in this instance.";
} }