Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check for new extensions #456

Merged
merged 2 commits into from May 16, 2018
Merged

Added check for new extensions #456

merged 2 commits into from May 16, 2018

Conversation

jesusgn90
Copy link
Contributor

Hello team, this pull request fix an inconsistency situation whenever we add a new extension to the App which is enabled by default.

The problem comes for old App packages, whose already have .wazuh documents created without the new extension. If the new extension is enabled on the config.yml file the App thinks it is disabled.

With this pull request we are ensuring we have all the .wazuh documents with the proper extensions updated. If the document already had a extension, it is ignored, otherwise we update it adding the new extension using the default value.

To check the extensions the function reads the config.yml and compares it with default-ext.js extensions. If it's not found con config.yml, looks for it on default-ext.js. Finally looks if the current .wazuh document being analyzed has that extension, if it hasn't got it, the extension is added to its extensions with the default value, otherwise that extension is skipped for that .wazuh document.

From now and onwards we need to explicitly add any new extension to default-ext.js with its default value.

This PR fixes #455

Regards,
Jesús

@jesusgn90 jesusgn90 self-assigned this May 16, 2018
@jesusgn90 jesusgn90 mentioned this pull request May 16, 2018
@havidarou
Copy link
Member

LGTM!

@havidarou havidarou merged commit 6e3e75a into 3.2 May 16, 2018
@havidarou havidarou deleted the 3.2-check-extensions branch May 16, 2018 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants