aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_mimepart.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-07-01 21:31:15 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-07-01 21:31:15 +0100
commitd87f4e9f5759b4cb85072b422d353cea1437df54 (patch)
tree0c7aa829d8f1c4d0e5569a5804a915fc87a39a42 /src/lua/lua_mimepart.c
parent060810317e4249c1e231109987990762931c81ff (diff)
downloadrspamd-d87f4e9f5759b4cb85072b422d353cea1437df54.tar.gz
rspamd-d87f4e9f5759b4cb85072b422d353cea1437df54.zip
[Feature] Check content for binary stuff before dumping it to Lua
Issue: #4204
Diffstat (limited to 'src/lua/lua_mimepart.c')
-rw-r--r--src/lua/lua_mimepart.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c
index 27b12ae6d..ae959c34e 100644
--- a/src/lua/lua_mimepart.c
+++ b/src/lua/lua_mimepart.c
@@ -1420,6 +1420,10 @@ lua_mimepart_get_content (lua_State * L)
t->len = part->parsed_data.len;
t->flags = 0;
+ if (lua_is_text_binary(t)) {
+ t->flags |= RSPAMD_TEXT_FLAG_BINARY;
+ }
+
return 1;
}