mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
network insight / export, return empty file when parameters are missing. closes https://github.com/opnsense/core/issues/1454
This commit is contained in:
parent
3e95dfa1d5
commit
2f426ba419
@ -261,7 +261,7 @@ class NetworkinsightController extends ApiControllerBase
|
||||
) {
|
||||
$this->response->setRawHeader("Content-Type: application/octet-stream");
|
||||
$this->response->setRawHeader("Content-Disposition: attachment; filename=".$provider.".csv");
|
||||
if ($this->request->isGet()) {
|
||||
if ($this->request->isGet() && $provider != null && $resolution != null ) {
|
||||
$backend = new Backend();
|
||||
$configd_cmd = "netflow aggregate export {$provider} {$from_date} {$to_date} {$resolution}";
|
||||
$response = $backend->configdRun($configd_cmd);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user