You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logprep matches filter keys on event values if the environment variable LOGPREP_BYPASS_RULE_TREE is set and a specific value is being filtered.
This raises a TypeError while parsing the filter expression, since it tries to get the key for a event value, which is a string:
logprep/filter/expression/filter_expression.py", line 90, in _get_value
current = current[item]
TypeError: string indices must be integers
Expected behavior
Rules never use event values to match filter keys.
Steps to reproduce
Start Logprep with the environment variable LOGPREP_BYPASS_RULE_TREE being set
Create any rule with a filter like key1.key2: value (just key1.key2 without a value won't cause problems)
Send an event like {"key1": "key2 is not a key"}
The rule will match and a TypeError will be raised.
Logprep matches filter keys on event values if the environment variable
LOGPREP_BYPASS_RULE_TREE
is set and a specific value is being filtered.This raises a
TypeError
while parsing the filter expression, since it tries to get the key for a event value, which is a string:Expected behavior
Rules never use event values to match filter keys.
Steps to reproduce
LOGPREP_BYPASS_RULE_TREE
being setkey1.key2: value
(justkey1.key2
without a value won't cause problems){"key1": "key2 is not a key"}
The rule will match and a
TypeError
will be raised.Environment
Logprep version: 56cf412
Python version: 3.11
The text was updated successfully, but these errors were encountered: