Skip to content

Commit

Permalink
String or function validation (#4219)
Browse files Browse the repository at this point in the history
* fix(modules-helper.js): string or function validation

* add changelog
  • Loading branch information
yenienserrano authored Jun 7, 2022
1 parent 526d9d4 commit 0abf708
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixed a toast message with a successful process appeared when removing an agent of a group in `Management/Groups` and the agent appears in the agent list after refreshing the table [#4167](https://github.com/wazuh/wazuh-kibana-app/pull/4167)
- Fixed import of an empty rule or decoder file [#4176](https://github.com/wazuh/wazuh-kibana-app/pull/4176)
- Fixed overwriting of rule and decoder imports [#4180](https://github.com/wazuh/wazuh-kibana-app/pull/4180)
- fixed missing background in the status graph tooltip in agents [#4198](https://github.com/wazuh/wazuh-kibana-app/pull/4198)
- Fixed missing background in the status graph tooltip in agents [#4198](https://github.com/wazuh/wazuh-kibana-app/pull/4198)
- Fixed the problem allowing to remove the filters from the module [#4219](https://github.com/wazuh/wazuh-kibana-app/pull/4219)

## Wazuh v4.3.3 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4304

Expand Down
4 changes: 3 additions & 1 deletion public/components/common/modules/modules-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export class ModulesHelper {
: moduleFilter.meta.key;
const objValue = moduleFilter.query?.match_phrase
? moduleFilter.query.match_phrase[objKey].query
: moduleFilter.meta.value();
: typeof moduleFilter.meta.value === 'function' // this check was added because sometimes it comes as a string and sometimes as a function.
? moduleFilter.meta.value() //TODO see if it is used when it is a function
: moduleFilter.meta.value;
const key = `filter-key-${objKey}`;
const value = `filter-value-${objValue}`;

Expand Down

0 comments on commit 0abf708

Please sign in to comment.