mirror of https://github.com/MISP/MISP
fix: [import modules] Avoiding issues with userConfig when module is csvimport
- If users tick the checkbox to specify there is a header in the csv file to import, there should not be an error with empty userConfig headerpull/3707/head
parent
07645de9ac
commit
afbb83a827
|
@ -5114,6 +5114,11 @@ class EventsController extends AppController
|
|||
$modulePayload['config'][$conf] = Configure::read('Plugin.Import_' . $moduleName . '_' . $conf);
|
||||
}
|
||||
}
|
||||
if ($moduleName === 'csvimport') {
|
||||
if (empty($this->request->data['Event']['config']['header']) && $this->request->data['Event']['config']['has_header'] === '1') {
|
||||
$this->request->data['Event']['config']['header'] = ' ';
|
||||
}
|
||||
}
|
||||
foreach ($module['mispattributes']['userConfig'] as $configName => $config) {
|
||||
if (!$fail) {
|
||||
if (isset($config['validation'])) {
|
||||
|
|
Loading…
Reference in New Issue