Fix indendation in http/upload.cgi
This commit is contained in:
parent
47312a4d7c
commit
f5967c88c0
1 changed files with 21 additions and 20 deletions
|
@ -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.";
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue