]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Apply max_lua_urls limit for emails as well
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Nov 2020 19:56:29 +0000 (19:56 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Nov 2020 19:56:29 +0000 (19:56 +0000)
src/lua/lua_task.c

index 188a19671168e56379edd6a6c7a9ad77d9d4b11c..061ed1ee2576797808a3975eb01c154f088bbf4d 100644 (file)
@@ -2567,6 +2567,10 @@ lua_task_get_emails (lua_State * L)
 
        if (task) {
                if (task->message) {
+                       if (task->cfg) {
+                               max_urls = task->cfg->max_lua_urls;
+                       }
+
                        if (!lua_url_cbdata_fill (L, 2, &cb, PROTOCOL_MAILTO,
                                        ~(RSPAMD_URL_FLAG_CONTENT|RSPAMD_URL_FLAG_IMAGE), max_urls)) {
                                return luaL_error (L, "invalid arguments");