]> git.ipfire.org Git - thirdparty/snort3.git/commit
Pull request #3623: utils: Add possibility to process keywords as identifiers
authorOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Tue, 18 Oct 2022 17:37:13 +0000 (17:37 +0000)
committerOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Tue, 18 Oct 2022 17:37:13 +0000 (17:37 +0000)
commit8ceeed2b9ca8d7013f9c205ad8a30e89e9fca0b4
treeb133cae1d2907e46e6ea994da17ed0eb2cb0e412
parent74a32411b53b29b49a6136646b00391053d26261
Pull request #3623: utils: Add possibility to process keywords as identifiers

Merge in SNORT/snort3 from ~ANOROKH/snort3:js_bracket_mismatch to master

Squashed commit of the following:

commit 5e2066e75b0a7e8db2e148e356638ec4060fc84d
Author: AnnaNorokh <annanorokh15@gmail.comm>
Date:   Thu Oct 13 14:11:33 2022 +0300

    utils: add possibility to process keywords as identifiers

        * added JavaScript scope property to track an object body,
        * process keywords as identifiers, if they were used as name function or object member,
        *'catch' and finally' were added to ignore list, so they would not normalized as function identifiers,
        * added unit tests to cover changes
        * 'function' isn't supporting as object member because of anonymous function peculiarities
lua/snort_defaults.lua
src/utils/js_tokenizer.h
src/utils/js_tokenizer.l
src/utils/test/js_normalizer_test.cc
src/utils/test/js_test_utils.h