]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Exclude virtual symbols when doing static checks
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 1 Jul 2019 10:50:27 +0000 (11:50 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 1 Jul 2019 10:50:27 +0000 (11:50 +0100)
src/libserver/rspamd_symcache.c

index 59423368eae84b2d23f65c41cd03d134d44466cc..2cd1d12774e8ef9aa0910c5edeafbced96288c41 100644 (file)
@@ -1441,14 +1441,21 @@ rspamd_symcache_is_item_allowed (struct rspamd_task *task,
                if (!item->enabled) {
                        msg_debug_cache_task ("skipping check of %s as it is permanently disabled",
                                        item->symbol);
+
+                       return FALSE;
                }
                else {
-                       msg_debug_cache_task ("skipping check of %s as it cannot be "
-                                                "executed for this task type",
-                                       item->symbol);
-               }
+                       /*
+                        * Exclude virtual symbols
+                        */
+                       if (exec_only) {
+                               msg_debug_cache_task ("skipping check of %s as it cannot be "
+                                                                         "executed for this task type",
+                                               item->symbol);
 
-               return FALSE;
+                               return FALSE;
+                       }
+               }
        }
 
        if (!exec_only) {