[Rspamd] Ratelimit: fix attempt to index a nil value when no authenticated user is found in a message
parent
6ee68ecfdb
commit
4c31adaa82
|
@ -59,10 +59,12 @@ rspamd_config:register_symbol({
|
|||
local redis_params = rspamd_parse_redis_server('dyn_rl')
|
||||
local rspamd_logger = require "rspamd_logger"
|
||||
local envfrom = task:get_from(1)
|
||||
local uname = task:get_user():lower()
|
||||
local uname = task:get_user()
|
||||
if not envfrom or not uname then
|
||||
return false
|
||||
end
|
||||
local uname = uname:lower()
|
||||
|
||||
local env_from_domain = envfrom[1].domain:lower() -- get smtp from domain in lower case
|
||||
|
||||
local function redis_cb_user(err, data)
|
||||
|
|
Loading…
Reference in New Issue