From 45b0392d8da2d58736ca63133f45fe1d79fdd836 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Tue, 12 Mar 2019 15:12:43 +0100 Subject: [PATCH 1/2] Removed unnecesary io_safe_inpunt on from functions_api.php Former-commit-id: 3120967c09d6629f0c1a1197d122a7e11788fbb7 --- pandora_console/include/functions_api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index e57dd31013..98f12faad7 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -11620,7 +11620,7 @@ function api_set_add_event_comment($id, $thrash2, $other, $thrash3) returnError('error_parameter', 'Error in the parameters.'); return; } else if ($other['type'] == 'array') { - $comment = io_safe_input($other['data'][0]); + $comment = $other['data'][0]; $meta = $other['data'][1]; $history = $other['data'][2]; From 33db6d2f0c324d3e3597771ef3b5cc72978c3ac1 Mon Sep 17 00:00:00 2001 From: Luis Calvo Date: Thu, 4 Apr 2019 18:13:29 +0200 Subject: [PATCH 2/2] If is metaconsole, param meta is setted to true Former-commit-id: d652754fc131a0024c0c7846335a4362767e5f1d --- pandora_console/include/functions_api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 98f12faad7..e3aedd122a 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -11608,7 +11608,9 @@ function api_set_add_event_comment($id, $thrash2, $other, $thrash3) global $config; if (defined('METACONSOLE')) { - return; + $meta = true; + } else { + $meta = $other['data'][1]; } if (!check_acl($config['id_user'], 0, 'EW')) { @@ -11621,7 +11623,6 @@ function api_set_add_event_comment($id, $thrash2, $other, $thrash3) return; } else if ($other['type'] == 'array') { $comment = $other['data'][0]; - $meta = $other['data'][1]; $history = $other['data'][2]; $status = events_comment(