aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_mimepart.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-08-02 21:12:38 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-08-02 21:12:38 +0100
commit2249d428bd8f27d8e952233c4a15a75f69b12316 (patch)
tree9fa330f3dbc3661b0044c493cef5a431d8836f16 /src/lua/lua_mimepart.c
parentc16f8e10a928e91f3b0b643bfebdaa2f90b4f521 (diff)
downloadrspamd-2249d428bd8f27d8e952233c4a15a75f69b12316.tar.gz
rspamd-2249d428bd8f27d8e952233c4a15a75f69b12316.zip
[Fix] Adjust length of the fuzzy checks for short text parts
Reported by: @citrin
Diffstat (limited to 'src/lua/lua_mimepart.c')
-rw-r--r--src/lua/lua_mimepart.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c
index ae959c34e..459a78e69 100644
--- a/src/lua/lua_mimepart.c
+++ b/src/lua/lua_mimepart.c
@@ -803,11 +803,7 @@ lua_textpart_get_content_oneline (lua_State * L)
return 1;
}
- t = lua_newuserdata (L, sizeof (*t));
- rspamd_lua_setclass (L, "rspamd{text}", -1);
- t->start = part->utf_stripped_content->data;
- t->len = part->utf_stripped_content->len;
- t->flags = 0;
+ lua_new_text(L, part->utf_stripped_content->data, part->utf_stripped_content->len, FALSE);
return 1;
}