]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Skip modifying headers for skipped tasks
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 3 Nov 2021 20:13:32 +0000 (20:13 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 3 Nov 2021 20:13:32 +0000 (20:13 +0000)
lualib/lua_mime.lua

index a57c2181ea7bce81a929bbcb525523f603625bee..a09ef84f80ae6d0c91060e5f8060c62c9d5625d6 100644 (file)
@@ -515,6 +515,10 @@ end
 -- Adds/removes headers both internal and in the milter reply
 --]]
 exports.modify_headers = function(task, hdr_alterations)
+  if task:has_flag('skip') then
+    -- Cannot set flags for skipped (and unprocessed) task
+    return
+  end
   local add = hdr_alterations.add or {}
   local remove = hdr_alterations.remove or {}