fix save of filters
This commit is contained in:
parent
e0a159736c
commit
0a1dd6fe24
|
@ -903,7 +903,7 @@ function netflow_get_command($filter)
|
|||
*
|
||||
* @return string Command line argument string.
|
||||
*/
|
||||
function netflow_get_filter_arguments($filter)
|
||||
function netflow_get_filter_arguments($filter, $safe_input=false)
|
||||
{
|
||||
// Advanced filter.
|
||||
$filter_args = '';
|
||||
|
@ -1015,7 +1015,7 @@ function netflow_get_filter_arguments($filter)
|
|||
}
|
||||
|
||||
if ($filter_args != '') {
|
||||
$filter_args = io_safe_input(escapeshellarg($filter_args));
|
||||
$filter_args = ($safe_input === true) ? io_safe_input(escapeshellarg($filter_args)) : escapeshellarg($filter_args);
|
||||
}
|
||||
|
||||
return $filter_args;
|
||||
|
|
|
@ -154,7 +154,7 @@ if (!is_metaconsole()) {
|
|||
// Save user defined filter.
|
||||
if ($save != '' && check_acl($config['id_user'], 0, 'AW')) {
|
||||
// Save filter args.
|
||||
$filter['filter_args'] = netflow_get_filter_arguments($filter);
|
||||
$filter['filter_args'] = netflow_get_filter_arguments($filter, true);
|
||||
|
||||
$filter_id = db_process_sql_insert('tnetflow_filter', $filter);
|
||||
if ($filter_id === false) {
|
||||
|
@ -171,7 +171,7 @@ if ($save != '' && check_acl($config['id_user'], 0, 'AW')) {
|
|||
unset($filter_copy['id_group']);
|
||||
|
||||
// Save filter args.
|
||||
$filter_copy['filter_args'] = netflow_get_filter_arguments($filter_copy);
|
||||
$filter_copy['filter_args'] = netflow_get_filter_arguments($filter_copy, true);
|
||||
|
||||
$result = db_process_sql_update(
|
||||
'tnetflow_filter',
|
||||
|
|
Loading…
Reference in New Issue