]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Deny symbols adding on idempotent stage
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 8 Oct 2017 08:53:18 +0000 (09:53 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 8 Oct 2017 08:53:18 +0000 (09:53 +0100)
src/libmime/filter.c

index 18ffce903c8488a6f648f1ebf0b8b5c628eeb9dd..efd3e7bb291f74f293a4798f749b2d9bd52f7e65 100644 (file)
@@ -266,6 +266,13 @@ insert_result_common (struct rspamd_task *task,
 {
        struct rspamd_symbol_result *s = NULL;
 
+       if (task->processed_stages & RSPAMD_TASK_STAGE_IDEMPOTENT) {
+               msg_err_task ("cannot insert symbol %s on idempotent phase",
+                       symbol);
+
+               return NULL;
+       }
+
        /* Insert symbol to default metric */
        s = insert_metric_result (task,
                        task->cfg->default_metric,