diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e3b45b16e..efc493604a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,13 @@ All notable changes to the Wazuh app project will be documented in this file. - Support new fields of Windows Registry at FIM inventory panel [#2679](https://github.com/wazuh/wazuh-kibana-app/issues/2679) - Added on FIM Inventory Windows Registry registry_key and registry_value items from syscheck [#2908](https://github.com/wazuh/wazuh-kibana-app/issues/2908) -- Uncheck agents afeter an actions in agentes groups [#2907](https://github.com/wazuh/wazuh-kibana-app/pull/2907) +- Uncheck agents after an action in agents groups management [#2907](https://github.com/wazuh/wazuh-kibana-app/pull/2907) ### Fixed - Fix server error Invalid token specified: Cannot read property 'replace' of undefined [#2899](https://github.com/wazuh/wazuh-kibana-app/issues/2899) - Fixed wrong hover texts in CDB lists actions [#2929](https://github.com/wazuh/wazuh-kibana-app/pull/2929) +- Fixed access to forbidden agents information when exporting agents listt [2918](https://github.com/wazuh/wazuh-kibana-app/pull/2918) ## Wazuh v4.0.4 - Kibana 7.10.0 , 7.10.2 - Revision 4017 diff --git a/server/controllers/wazuh-api.ts b/server/controllers/wazuh-api.ts index c79b9c9474..6965696fa2 100644 --- a/server/controllers/wazuh-api.ts +++ b/server/controllers/wazuh-api.ts @@ -733,8 +733,6 @@ export class WazuhApiCtrl { const filters = Array.isArray(((request || {}).body || {}).filters) ? request.body.filters : []; - const config = await this.manageHosts.getHostById(request.body.id); - let tmpPath = request.body.path; if (tmpPath && typeof tmpPath === 'string') { @@ -756,7 +754,7 @@ export class WazuhApiCtrl { let itemsArray = []; - const output = await context.wazuh.api.client.asInternalUser.request( + const output = await context.wazuh.api.client.asCurrentUser.request( 'GET', `/${tmpPath}`, { params: params }, @@ -772,7 +770,7 @@ export class WazuhApiCtrl { itemsArray.push(...output.data.data.affected_items); while (itemsArray.length < totalItems && params.offset < totalItems) { params.offset += params.limit; - const tmpData = await context.wazuh.api.client.asInternalUser.request( + const tmpData = await context.wazuh.api.client.asCurrentUser.request( 'GET', `/${tmpPath}`, { params: params },