Fix bug 10916: files prefixed with thumb- cause errors.
Rename files that are uploaded to remove thumb-.
This commit is contained in:
parent
6c4b4d1a88
commit
0e94d42034
4 changed files with 35 additions and 25 deletions
|
|
@ -381,6 +381,7 @@ sub addFileFromFormPost {
|
|||
next
|
||||
if ($upload->size > 1024 * $self->session->setting->get("maxAttachmentSize"));
|
||||
$clientFilename =~ s/.*[\/\\]//;
|
||||
$clientFilename =~ s/^thumb-//;
|
||||
my $type = $self->getFileExtension($clientFilename);
|
||||
if (isIn($type, qw(pl perl sh cgi php asp html htm))) { # make us safe from malicious uploads
|
||||
$clientFilename =~ s/\./\_/g;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue