]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[CritFix] Really skip filters in case of pre-result set
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 3 May 2016 15:51:09 +0000 (16:51 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 3 May 2016 15:51:09 +0000 (16:51 +0100)
src/libserver/task.c

index af7495b237429c3f2362eac03537657dd0cee31c..890e05f2072c5a5125eb387cffe2d50b4899f4df 100644 (file)
@@ -435,6 +435,14 @@ rspamd_task_process (struct rspamd_task *task, guint stages)
                return TRUE;
        }
 
+       if (task->pre_result.action != METRIC_ACTION_MAX) {
+               /* Skip all if we have result here */
+               task->processed_stages |= RSPAMD_TASK_STAGE_DONE;
+               msg_info_task ("skip filters, as pre-filter returned %s action",
+                               rspamd_action_to_str (task->pre_result.action));
+       }
+
+
        task->flags |= RSPAMD_TASK_FLAG_PROCESSING;
 
        st = rspamd_task_select_processing_stage (task, stages);
@@ -448,13 +456,6 @@ rspamd_task_process (struct rspamd_task *task, guint stages)
 
        case RSPAMD_TASK_STAGE_PRE_FILTERS:
                rspamd_lua_call_pre_filters (task);
-
-               if (task->pre_result.action != METRIC_ACTION_MAX) {
-                       /* Skip all if we have result here */
-                       task->processed_stages |= RSPAMD_TASK_STAGE_DONE;
-                       msg_info_task ("skip filters, as pre-filter returned %s action",
-                                       rspamd_action_to_str (task->pre_result.action));
-               }
                break;
 
        case RSPAMD_TASK_STAGE_FILTERS: