From: Vsevolod Stakhov Date: Thu, 14 Mar 2024 14:54:14 +0000 (+0000) Subject: [Fix] Fuzzy add/delete handlers are badly broken for compression X-Git-Tag: 3.9.0~97 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a73a67f91d561f7458fa7ebe61f3ff4eeab0fb1e;p=rspamd.git [Fix] Fuzzy add/delete handlers are badly broken for compression --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 62ddef504..15f556c40 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -3467,8 +3467,13 @@ fuzzy_process_handler(struct rspamd_http_connection_entry *conn_ent, if (!is_hash) { /* Allocate message from string */ /* XXX: what about encrypted messages ? */ - task->msg.begin = msg->body_buf.begin; - task->msg.len = msg->body_buf.len; + if (!rspamd_task_load_message(task, msg, msg->body_buf.begin, msg->body_buf.len)) { + msg_warn_task("cannot load message for fuzzy"); + rspamd_controller_send_error(conn_ent, 400, "Message load error"); + rspamd_task_free(task); + + return; + } r = rspamd_message_parse(task);