aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_scanners/vadesecure.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-08-07 11:41:28 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-08-07 11:41:28 +0100
commit662145d0554de5e769b92dab2d41173a98adcee5 (patch)
treeec28311a0bce6181f248ba7b50304293ad764e44 /lualib/lua_scanners/vadesecure.lua
parentbbd88232db43d18f5e0de5a6502848d4074621c5 (diff)
downloadrspamd-662145d0554de5e769b92dab2d41173a98adcee5.tar.gz
rspamd-662145d0554de5e769b92dab2d41173a98adcee5.zip
[Minor] Reformat all Lua code, no functional changes
Diffstat (limited to 'lualib/lua_scanners/vadesecure.lua')
-rw-r--r--lualib/lua_scanners/vadesecure.lua16
1 files changed, 9 insertions, 7 deletions
diff --git a/lualib/lua_scanners/vadesecure.lua b/lualib/lua_scanners/vadesecure.lua
index b912eb46f..826573a89 100644
--- a/lualib/lua_scanners/vadesecure.lua
+++ b/lualib/lua_scanners/vadesecure.lua
@@ -85,17 +85,17 @@ local function vade_config(opts)
score = 8.0,
description = 'VadeSecure decided message to be phishing'
},
- commercial = {
+ commercial = {
symbol = 'VADE_COMMERCIAL',
score = 0.0,
description = 'VadeSecure decided message to be commercial message'
},
- community = {
+ community = {
symbol = 'VADE_COMMUNITY',
score = 0.0,
description = 'VadeSecure decided message to be community message'
},
- transactional = {
+ transactional = {
symbol = 'VADE_TRANSACTIONAL',
score = 0.0,
description = 'VadeSecure decided message to be transactional message'
@@ -250,9 +250,9 @@ local function vade_check(task, content, digest, rule, maybe_part)
http.request(request_data)
else
- rspamd_logger.errx(task, '%s: failed to scan, maximum retransmits '..
+ rspamd_logger.errx(task, '%s: failed to scan, maximum retransmits ' ..
'exceed', rule.log_prefix)
- task:insert_result(rule['symbol_fail'], 0.0, 'failed to scan and '..
+ task:insert_result(rule['symbol_fail'], 0.0, 'failed to scan and ' ..
'retransmits exceed')
end
end
@@ -261,7 +261,9 @@ local function vade_check(task, content, digest, rule, maybe_part)
vade_requery()
else
-- Parse the response
- if upstream then upstream:ok() end
+ if upstream then
+ upstream:ok()
+ end
if code ~= 200 then
rspamd_logger.errx(task, 'invalid HTTP code: %s, body: %s, headers: %s', code, body, headers)
task:insert_result(rule.symbol_fail, 1.0, 'Bad HTTP code: ' .. code)
@@ -341,7 +343,7 @@ local function vade_check(task, content, digest, rule, maybe_part)
end
return {
- type = {'vadesecure', 'scanner'},
+ type = { 'vadesecure', 'scanner' },
description = 'VadeSecure Filterd interface',
configure = vade_config,
check = vade_check,