]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect/dataset: fix space condition in rule lang
authorShivani Bhardwaj <shivanib134@gmail.com>
Fri, 28 Jan 2022 20:17:17 +0000 (01:47 +0530)
committerShivani Bhardwaj <shivanib134@gmail.com>
Mon, 11 Apr 2022 07:41:07 +0000 (13:11 +0530)
commit5e084d4daaa3d3dca9c3711e5725ea09d9f8dd72
tree3b98710a4cf99b75144a87dd8909b2fc886bfc06
parentb8305b11083932f4ff25ac8541f455bd7593a089
detect/dataset: fix space condition in rule lang

If there is a space following a keyword that does not expect a value,
the rule fails to load due to improper value evaluation.
e.g. Space after "set" command
alert http any any -> any any (http.user_agent; dataset:set  ,ua-seen,type string,save datasets.csv; sid:1;)

gives error
[ERRCODE: SC_ERR_UNKNOWN_VALUE(129)] - dataset action "" is not supported.

Fix this by handling values correctly for such cases.

(cherry picked from commit 6d2a2a073120906304f70c0e120565eae96e36b8)
src/detect-dataset.c