mirror of https://github.com/MISP/MISP
Merge branch 'weekend_fixes' into 2.4
commit
d652927261
|
@ -751,7 +751,7 @@ class ServersController extends AppController
|
|||
}
|
||||
$file = new File($server['Server'][$subm]['name']);
|
||||
$ext = $file->ext();
|
||||
if (($ext != 'pem') || !$server['Server'][$subm]['size'] > 0) {
|
||||
if (!$server['Server'][$subm]['size'] > 0) {
|
||||
$this->Flash->error('Incorrect extension or empty file.');
|
||||
$this->redirect(array('action' => 'index'));
|
||||
}
|
||||
|
|
|
@ -4385,7 +4385,11 @@ class Event extends AppModel
|
|||
if (!empty($object['data'])) {
|
||||
$object['image'] = $object['data'];
|
||||
} else {
|
||||
$object['image'] = $this->Attribute->base64EncodeAttachment($object);
|
||||
if ($object['objectType'] === 'proposal') {
|
||||
$object['image'] = $this->ShadowAttribute->base64EncodeAttachment($object);
|
||||
} else {
|
||||
$object['image'] = $this->Attribute->base64EncodeAttachment($object);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($object['distribution']) && $object['distribution'] != 4) {
|
||||
|
|
Loading…
Reference in New Issue