summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-01 13:13:33 +0000
committerGitHub <noreply@github.com>2017-03-01 13:13:33 +0000
commitb378b871aed9b8c1c614af46c4bc9832ecce0887 (patch)
treebde9254ebaec160b782729251e6644696d2bfa05 /src
parent9423220c8f6b6d1a6da990444a737ee843d46401 (diff)
parent6bc88cf287a9af5a194ae6087a3c633dde41a265 (diff)
downloadrspamd-b378b871aed9b8c1c614af46c4bc9832ecce0887.tar.gz
rspamd-b378b871aed9b8c1c614af46c4bc9832ecce0887.zip
Merge pull request #1465 from croessner/antivirus
[Minor] Chose correct virus name from returned string
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/antivirus.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua
index e6007dc26..d848d789b 100644
--- a/src/plugins/lua/antivirus.lua
+++ b/src/plugins/lua/antivirus.lua
@@ -529,10 +529,7 @@ local function savapi_check(task, rule)
elseif string.find(result, '310') then
-- infected message
rspamd_logger.debugm(N, task, 'infected message')
- local parts = rspamd_str_split(result, ' ')
- local message = parts[2]
- -- A message: <alert> ; <type> ; <description>
- local vname = rspamd_str_split(message, ';')[1]
+ local vname = rspamd_str_split(result, ' ')[4]
rspamd_logger.infox(task, 'SAVAPI: virus found: %s', vname)
yield_result(task, rule, vname)
save_av_cache(task, rule, vname)