Remove extra dot between filename and ext when downloading attachment.

pull/61/head
noud 2012-07-12 11:24:44 +02:00 committed by noud
parent d879deb027
commit 8db00efdac
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ class AttributesController extends AppController {
if('attachment' == $this->Attribute->data['Attribute']['type']) {
$filename= $this->Attribute->data['Attribute']['value'];
$file_ext = pathinfo($filename, PATHINFO_EXTENSION);
$filename= substr($filename,0,strlen($filename)-strlen($file_ext));
$filename= substr($filename,0,strlen($filename)-strlen($file_ext)-1);
} elseif ('malware-sample'== $this->Attribute->data['Attribute']['type']) {
$filename_hash = explode('|', $this->Attribute->data['Attribute']['value']);
$filename = $filename_hash[0];