-
Problem report
-
Resolution: Fixed
-
Trivial
-
4.0.1, 4.2.0alpha1, 4.2 (plan)
-
Sprint 47, Dec 2018
-
0.25
When regular expression preprocessing step is created by LLD the LLD macros in its parameter are resolved with escaped regular expression control characters. However the params field contains two parameters - regular expression and output. Only regular expression must be escaped (the '\' character need to be ecaped in ouput part, but that's it).
For example create discovery rule with regular expression preprocessing step having parameters
{#PARAM1}: ([0-9]+) and {#PARAM2}=\1
Send discovery with
{ "data": [ { "{#PARAM1}": "field(x)", "{#PARAM2}": "func(\\1)", } ] }
The output parameter will be escaped to
func\(\\1\)=\1
while it should be
func(\\1)=\1