diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-03 16:23:34 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-03 16:23:34 +0100 |
commit | 5dea259459069c35a6afe94304810fe5365cd819 (patch) | |
tree | c25ca862bf77d89ee17e69fa19b95199e4f14cac /src/lua/lua_config.c | |
parent | c7ae2de0541e0772b08cf4121fbfbd83aa1235d2 (diff) | |
download | rspamd-5dea259459069c35a6afe94304810fe5365cd819.tar.gz rspamd-5dea259459069c35a6afe94304810fe5365cd819.zip |
[CritFix] Restore the intended pre-filters behaviour
Previously, filters and post-filters were checked even if pre-filter has
set some result. Now pre-result efficienly makes a trapdoor to writing
reply (as it was before 1.0).
Diffstat (limited to 'src/lua/lua_config.c')
-rw-r--r-- | src/lua/lua_config.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index a8b08cc51..fb84c4988 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -779,6 +779,12 @@ rspamd_lua_call_pre_filters (struct rspamd_task *task) lua_tostring (cd->L, -1)); lua_pop (cd->L, 1); } + + if (task->pre_result.action != METRIC_ACTION_MAX) { + /* Stop processing on reaching some pre-result */ + break; + } + cur = g_list_next (cur); } } |