From: Vsevolod Stakhov Date: Sun, 4 Jul 2021 20:29:58 +0000 (+0100) Subject: [Minor] Lemove legacy X-Git-Tag: 3.0~215 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0e21fac34d4a2cd3da1f16595f8c707fce92e040;p=rspamd.git [Minor] Lemove legacy --- diff --git a/src/libmime/message.c b/src/libmime/message.c index 684971cd5..9421e225b 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -764,7 +764,6 @@ rspamd_message_process_html_text_part (struct rspamd_task *task, } - text_part->flags |= RSPAMD_MIME_TEXT_PART_FLAG_BALANCED; text_part->html = rspamd_html_process_part_full ( task->task_pool, text_part->utf_raw_content, diff --git a/src/libmime/message.h b/src/libmime/message.h index 8805fbf30..4549c056d 100644 --- a/src/libmime/message.h +++ b/src/libmime/message.h @@ -113,14 +113,11 @@ struct rspamd_mime_part { }; #define RSPAMD_MIME_TEXT_PART_FLAG_UTF (1 << 0) -#define RSPAMD_MIME_TEXT_PART_FLAG_BALANCED (1 << 1) -#define RSPAMD_MIME_TEXT_PART_FLAG_EMPTY (1 << 2) -#define RSPAMD_MIME_TEXT_PART_FLAG_HTML (1 << 3) -#define RSPAMD_MIME_TEXT_PART_FLAG_8BIT_RAW (1 << 4) -#define RSPAMD_MIME_TEXT_PART_FLAG_8BIT_ENCODED (1 << 5) -#define RSPAMD_MIME_TEXT_PART_HAS_SUBNORMAL (1 << 6) -#define RSPAMD_MIME_TEXT_PART_NORMALISED (1 << 7) -#define RSPAMD_MIME_TEXT_PART_ATTACHMENT (1 << 8) +#define RSPAMD_MIME_TEXT_PART_FLAG_EMPTY (1 << 1) +#define RSPAMD_MIME_TEXT_PART_FLAG_HTML (1 << 2) +#define RSPAMD_MIME_TEXT_PART_FLAG_8BIT_RAW (1 << 3) +#define RSPAMD_MIME_TEXT_PART_FLAG_8BIT_ENCODED (1 << 4) +#define RSPAMD_MIME_TEXT_PART_ATTACHMENT (1 << 5) #define IS_TEXT_PART_EMPTY(part) ((part)->flags & RSPAMD_MIME_TEXT_PART_FLAG_EMPTY) #define IS_TEXT_PART_UTF(part) ((part)->flags & RSPAMD_MIME_TEXT_PART_FLAG_UTF) diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c index a528be50c..477b1dc5d 100644 --- a/src/libmime/mime_expressions.c +++ b/src/libmime/mime_expressions.c @@ -1564,24 +1564,8 @@ rspamd_compare_transfer_encoding (struct rspamd_task * task, gboolean rspamd_is_html_balanced (struct rspamd_task * task, GArray * args, void *unused) { - struct rspamd_mime_text_part *p; - guint i; - gboolean res = TRUE; - - PTR_ARRAY_FOREACH (MESSAGE_FIELD (task, text_parts), i, p) { - if (IS_TEXT_PART_HTML (p)) { - if (p->flags & RSPAMD_MIME_TEXT_PART_FLAG_BALANCED) { - res = TRUE; - } - else { - res = FALSE; - break; - } - } - } - - return res; - + /* Totally broken but seems to be never used */ + return TRUE; } gboolean