From 613529c76cdc6565aae5bb696db0bae8216a9f7e Mon Sep 17 00:00:00 2001 From: Mark Unwin Date: Fri, 9 Feb 2024 14:58:45 +1000 Subject: [PATCH] Allow received data to go to enterprise.bin for the configuration collection (updating a license). --- app/Helpers/response_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Helpers/response_helper.php b/app/Helpers/response_helper.php index 0dda399f9..1a9cc1d00 100644 --- a/app/Helpers/response_helper.php +++ b/app/Helpers/response_helper.php @@ -423,7 +423,7 @@ function response_create($instance = null) $permission_requested = $response->meta->permission_requested; if (!empty($config->enterprise_binary) and $db->tableExists('enterprise')) { $function = $response->meta->collection . '_' . $response->meta->action; - if (!in_array($function, array("baselines_create", "baselines_execute", "clusters_create", "collectors_create", "collectors_register", "dashboards_create", "discovery_scan_options_create", "discovery_scan_options_update", "racks_create", "roles_create", "tasks_create", "widgets_create", "widgets_update")) and + if (!in_array($function, array("baselines_create", "baselines_execute", "clusters_create", "collectors_create", "collectors_register", "configuration_update", "dashboards_create", "discovery_scan_options_create", "discovery_scan_options_update", "racks_create", "roles_create", "tasks_create", "widgets_create", "widgets_update")) and !($function !== 'configuration_update' and ($response->meta->id !== $config->license_string_id or $response->meta->id !== $config->license_string_collector_id))) { $received_data = $response->meta->received_data; $response->meta->received_data = array(); @@ -507,7 +507,7 @@ function response_create($instance = null) $sql = "DELETE FROM enterprise WHERE DATE(timestamp) < SUBDATE(CURDATE(), 0)"; $db->query($sql); } - if (!in_array($function, array("baselines_create", "baselines_execute", "clusters_create", "collectors_create", "collectors_register", "dashboards_create", "discovery_scan_options_create", "discovery_scan_options_update", "racks_create", "roles_create", "tasks_create", "widgets_create", "widgets_update")) and + if (!in_array($function, array("baselines_create", "baselines_execute", "clusters_create", "collectors_create", "collectors_register", "configuration_update", "dashboards_create", "discovery_scan_options_create", "discovery_scan_options_update", "racks_create", "roles_create", "tasks_create", "widgets_create", "widgets_update")) and !($function !== 'configuration_update' and ($response->meta->id !== $config->license_string_id or $response->meta->id !== $config->license_string_collector_id))) { $response->meta->received_data = $received_data; }