fixing some typos. also the File/Storage bug. also fixing the changelogs.
This commit is contained in:
parent
21188e7949
commit
e4bf3c60b0
6 changed files with 24 additions and 27 deletions
|
|
@ -203,14 +203,9 @@ sub addFileFromFormPost {
|
|||
my $attachmentCount = 1;
|
||||
foreach my $upload ($session{req}->upload($formVariableName)) {
|
||||
return $filename if $attachmentCount > $attachmentLimit;
|
||||
my $tempPath = $upload->tempname();
|
||||
$filename = $upload->filename();
|
||||
next unless $filename;
|
||||
if ($tempPath =~ /([^\/\\]+)$/) {
|
||||
$filename = $1;
|
||||
} else {
|
||||
$filename = $tempPath;
|
||||
}
|
||||
if ($filename =~ /([^\/\\]+)$/) { $filename = $1; }
|
||||
my $type = $self->getFileExtension($filename);
|
||||
if (isIn($type, qw(pl perl sh cgi php asp))) { # make us safe from malicious uploads
|
||||
$filename =~ s/\./\_/g;
|
||||
|
|
@ -233,7 +228,8 @@ sub addFileFromFormPost {
|
|||
return undef;
|
||||
}
|
||||
}
|
||||
return $filename;
|
||||
return $filename if $filename;
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue