From: root Date: Tue, 28 May 2024 13:00:56 +0000 (+0200) Subject: Fix get_words_count method to be called on the textpart and not on the mimepart X-Git-Tag: 3.9.0~32^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F4992%2Fhead;p=rspamd.git Fix get_words_count method to be called on the textpart and not on the mimepart --- diff --git a/lualib/lua_scanners/common.lua b/lualib/lua_scanners/common.lua index 11f5e1f87..fa751f4f4 100644 --- a/lualib/lua_scanners/common.lua +++ b/lualib/lua_scanners/common.lua @@ -459,7 +459,7 @@ local function check_parts_match(task, rule) -- check text_part has more words than text_part_min_words_check if rule.scan_text_mime and rule.text_part_min_words and p:is_text() and - p:get_words_count() >= tonumber(rule.text_part_min_words) then + p:get_text():get_words_count() >= tonumber(rule.text_part_min_words) then return true end