An empty `In-Reply-To` header value ("") is truthy in Lua,
bypassing the `nil` check. In `replies_check` this caused a
misleading log entry "ignoring reply to as no recipients
are matching hash ". In `replies_check_cookie` it triggered
an unnecessary `decrypt_cookie` call.
end
end
end
- -- If in-reply-to header not present return
+ -- If in-reply-to header not present or empty return
in_reply_to = task:get_header_raw('in-reply-to')
- if not in_reply_to then
+ if not in_reply_to or #in_reply_to == 0 then
return
end
-- Create hash of in-reply-to and query redis
end
end
- -- If in-reply-to header not present return
+ -- If in-reply-to header not present or empty return
local irt = task:get_header('in-reply-to')
- if irt == nil then
+ if not irt or #irt == 0 then
return
end
local cr = require "rspamd_cryptobox"