]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3463: Fixit handling
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Tue, 14 Jun 2022 14:13:44 +0000 (14:13 +0000)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Tue, 14 Jun 2022 14:13:44 +0000 (14:13 +0000)
Merge in SNORT/snort3 from ~DKYRYLOV/snort3:fixit_handling to master

Squashed commit of the following:

commit 0941456ee529069d60f8edd1725ccbda3dbfb015
Author: dkyrylov <dkyrylov@cisco.com>
Date:   Tue Jun 7 12:58:02 2022 +0300

    utils, parser: remove redundant fixits
       Remove FIXIT-L@js_normalizer_test.cc:4249
       US created to handle the fixit

       Remove FIXIT-M@parser.cc:702
       The issue was handled in 2414d8b9d22,
       but the FIXIT comment was left

       Reword FIXIT-M@parse-conf.cc:210

src/parser/parse_conf.cc
src/parser/parser.cc
src/utils/test/js_normalizer_test.cc

index e5e95f6474ffb519701f60e9fac9104c546cd921..5efc9a83b184b913aa94b609f62fefe536505c61 100644 (file)
@@ -207,8 +207,9 @@ void parse_include(SnortConfig* sc, const char* arg)
 void ParseIpVar(const char* var, const char* value)
 {
     int ret;
-    IpsPolicy* p = get_ips_policy();  // FIXIT-M double check, see below
-    DisallowCrossTableDuplicateVars(var, VAR_TYPE__IPVAR);
+    IpsPolicy* p = get_ips_policy();
+    DisallowCrossTableDuplicateVars(var, VAR_TYPE__IPVAR); 
+    // FIXIT-M: ip checked for duplicates twice: in the function above and in sfvt_add_str
 
     if ((ret = sfvt_define(p->ip_vartable, var, value)) != SFIP_SUCCESS)
     {
index 84620e28e828704dc23fe3db09a63f2fad9ef35c..0ae4e5899cbe767ad9e2b931152ad4452f3a255f 100644 (file)
@@ -698,7 +698,7 @@ void OrderRuleLists(SnortConfig* sc)
     const char* order = sc->rule_order.c_str();
     if ( !*order )
     {
-        default_priorities = Actions::get_default_priorities();  // FIXIT-M apply builtin module defaults
+        default_priorities = Actions::get_default_priorities();
         order = default_priorities.c_str();
     }
 
index 5449a374814d4bcbc6a77944966c13ac6bde1576..906657e669b44d9212ec754985dae3b815a9496e 100644 (file)
@@ -4204,9 +4204,6 @@ TEST_CASE("ignored properties", "[JSNormalizer]")
         const char dat19[] = "foo . + unwatch() . bar ;";
         const char dat20[] = "foo . + ['unwatch']() . bar ;";
 
-        // FIXIT-L: add support for proper tracking of bracket accessors.
-        // Current behavior: foo['watch'].bar -> var_0000['watch'].var_0001
-        // Expected behavior: foo['watch'].bar -> var_0000['watch'].bar
         const char exp1[] = "var_0000.watch.bar;";
         const char exp2[] = "var_0000['watch'].var_0001;";
         const char exp3[] = "var_0000.var_0001.watch.bar;";