]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] SAVAPI deal correctly with archives 1466/head
authorChristian Roessner <c@roessner-network-solutions.com>
Wed, 1 Mar 2017 13:47:05 +0000 (14:47 +0100)
committerChristian Roessner <c@roessner-network-solutions.com>
Wed, 1 Mar 2017 13:47:05 +0000 (14:47 +0100)
src/plugins/lua/antivirus.lua

index d848d789bafd497698e67099a9fe94828741637f..de455f8058bcf4c9f621e811671344f8fb86baf5 100644 (file)
@@ -529,7 +529,9 @@ local function savapi_check(task, rule)
       elseif string.find(result, '310') then
         -- infected message
         rspamd_logger.debugm(N, task, 'infected message')
-        local vname = rspamd_str_split(result, ' ')[4]
+       -- Recursive result
+       local parts = rspamd_str_split(result, ' <<< ')
+        local vname = rspamd_str_split(parts[2], ';')[1]:match "^%s*(.-)%s*$"
         rspamd_logger.infox(task, 'SAVAPI: virus found: %s', vname)
         yield_result(task, rule, vname)
         save_av_cache(task, rule, vname)