From dd9783636f3a77e693b778c7617134bb23676fc3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 8 Oct 2017 09:53:18 +0100 Subject: [Minor] Deny symbols adding on idempotent stage --- src/libmime/filter.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libmime') diff --git a/src/libmime/filter.c b/src/libmime/filter.c index 18ffce903..efd3e7bb2 100644 --- a/src/libmime/filter.c +++ b/src/libmime/filter.c @@ -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, -- cgit v1.2.3