[Rspamd] workaround - remove "--\x0D\x0A" prefix from rewritten cts

This commit is contained in:
FreddleSpl0it 2023-11-20 12:38:37 +01:00
parent 55576084fc
commit 8ba1e1ba9e
No known key found for this signature in database
GPG Key ID: 00E14E7634F4BEC5

View File

@ -635,6 +635,10 @@ rspamd_config:register_symbol({
out_parts[#out_parts + 1] = o
out_parts[#out_parts + 1] = newline_s
else
local removePrefix = "--\x0D\x0AContent-Type"
if string.lower(string.sub(tostring(o[1]), 1, string.len(removePrefix))) == string.lower(removePrefix) then
o[1] = string.sub(tostring(o[1]), string.len("--\x0D\x0A") + 1)
end
out_parts[#out_parts + 1] = o[1]
if o[2] then
out_parts[#out_parts + 1] = newline_s