wazuh-dashboard-plugins icon indicating copy to clipboard operation
wazuh-dashboard-plugins copied to clipboard

Error when trying to add a new decoder with an escaped `<` character

Open mcarmona99 opened this issue 3 years ago • 1 comments

Wazuh Elastic
4.1.0 7.10.2

Description

There is an error when trying to add a new decoder with an escaped < character from the Wazuh APP. The decoder is added successfully and no errors appear when adding the decoder to the XML decoder file without using the APP.

For example, if we try to add the following decoder:

<decoder name="custom-1">
    <prematch>\<\d+>something</prematch>
</decoder>

There will be an error with the following message:

element parse error: invalid tagName: \d+

tagName will vary depending on what is following the < character.

This error does not appear if we try to escape a different character from the ones that must be escaped: Characters escaping section of the Wazuh documentation.

Steps to reproduce

  1. Go to Wazuh/management/decoders
  2. Click on add new decoders file
  3. Write a decoder including the < character escaped.
  4. See error

Screenshots

image-issue

mcarmona99 avatar Jul 28 '21 08:07 mcarmona99

After testing this issue by making a curl request to Wazuh API, seems the API also does not support escaping characters in the decoders XML.

Related Issue: https://github.com/wazuh/wazuh/issues/7777

For further information see the attached request dump file. debugdump.txt

asteriscos avatar Sep 08 '21 14:09 asteriscos

This will be addressed in future issues with the new engine endpoints.

gdiazlo avatar May 11 '23 12:05 gdiazlo