- Fixed a syntax error in Post.pm
- fix [ 1382675 ] File Path Wrong - Uploads are difficult - fix [ 1380368 ] Snippets should not contain debugging info - fix [ 1377668 ] Unescaped double quote in Syndacate title cause problems
This commit is contained in:
parent
a1e85d8b12
commit
1bcfa3bddc
6 changed files with 24 additions and 17 deletions
|
|
@ -203,8 +203,12 @@ sub addFileFromFormPost {
|
|||
my $attachmentCount = 1;
|
||||
foreach my $upload ($session{req}->upload($formVariableName)) {
|
||||
return $filename if $attachmentCount > $attachmentLimit;
|
||||
my $tempPath = $upload->tempname();
|
||||
$filename = $upload->filename();
|
||||
my $tempPath = $upload->filename();
|
||||
if ($tempPath =~ /([^\/\\]+)$/) {
|
||||
$filename = $1;
|
||||
} else {
|
||||
$filename = $tempPath;
|
||||
}
|
||||
next unless $filename;
|
||||
my $type = $self->getFileExtension($filename);
|
||||
if (isIn($type, qw(pl perl sh cgi php asp))) { # make us safe from malicious uploads
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue