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;
|
||||
|
||||
foreach(@not_allowed_extensions)
|
||||
{
|
||||
{
|
||||
if($filename =~ /\.$_$/i)
|
||||
{
|
||||
$allowed_extension = 0;
|
||||
last;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if($allowed_extension)
|
||||
{
|
||||
|
||||
open(FILE,">$upload_dir/$filename");
|
||||
binmode(FILE);
|
||||
|
||||
while(<$upload_filehandle>)
|
||||
{
|
||||
|
||||
open(FILE,">$upload_dir/$filename");
|
||||
binmode(FILE);
|
||||
|
||||
while(<$upload_filehandle>)
|
||||
{
|
||||
print FILE;
|
||||
}
|
||||
|
||||
close FILE;
|
||||
|
||||
print $ENV{HTTP_REFERER} . "$upload_dir$filename";
|
||||
}
|
||||
|
||||
close FILE;
|
||||
|
||||
print $ENV{HTTP_REFERER} . "$upload_dir$filename";
|
||||
}
|
||||
|
||||
else {
|
||||
else
|
||||
{
|
||||
print "The file extension .$extension is not allowed in this instance.";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue