commit 6296a24: [Rules] Fix the case when there are no received headers
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Jan 15 14:56:03 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-01-15 14:52:48 +0000
URL: https://github.com/rspamd/rspamd/commit/6296a24a75b00bd04d16031d6b09080baa7c56c1 (HEAD -> master)
[Rules] Fix the case when there are no received headers
---
rules/misc.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rules/misc.lua b/rules/misc.lua
index f6d1c81b9..26f2a1357 100644
--- a/rules/misc.lua
+++ b/rules/misc.lua
@@ -198,7 +198,7 @@ local check_rcvd = rspamd_config:register_symbol{
group = 'headers',
callback = function (task)
local rcvds = task:get_received_headers()
- if not rcvds then return false end
+ if not rcvds or #rcvds == 0 then return false end
local all_tls = fun.all(function(rc)
return rc.flags and rc.flags['ssl']
More information about the Commits
mailing list