commit 6a32c3a: [Minor] Bimi: Fold huge bimi header
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Dec 14 17:49:08 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-12-14 16:41:01 +0000
URL: https://github.com/rspamd/rspamd/commit/6a32c3ad6043c433e5c3ca458c4c3a47bcc67641
[Minor] Bimi: Fold huge bimi header
---
src/plugins/lua/bimi.lua | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/plugins/lua/bimi.lua b/src/plugins/lua/bimi.lua
index bc3d90be7..a2768ea26 100644
--- a/src/plugins/lua/bimi.lua
+++ b/src/plugins/lua/bimi.lua
@@ -110,12 +110,16 @@ end
local function insert_bimi_headers(task, domain, bimi_content)
local hdr_name = 'BIMI-Indicator'
+ -- Re-encode base64...
+ local content = rspamd_util.encode_base64(rspamd_util.decode_base64(bimi_content),
+ 73, task:get_newlines_type())
lua_mime.modify_headers(task, {
remove = {[hdr_name] = 0},
add = {
[hdr_name] = {
order = 0,
- value = rspamd_util.fold_header(hdr_name, bimi_content)
+ value = rspamd_util.fold_header(hdr_name, content,
+ task:get_newlines_type())
}
}
})
More information about the Commits
mailing list