aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-04 21:29:58 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-04 21:29:58 +0100
commit0e21fac34d4a2cd3da1f16595f8c707fce92e040 (patch)
treec6b36b424681d56a44d972384043a71889dd07ef
parentbdd0df711545560749d4d05b4d8e0e878090113d (diff)
downloadrspamd-0e21fac34d4a2cd3da1f16595f8c707fce92e040.tar.gz
rspamd-0e21fac34d4a2cd3da1f16595f8c707fce92e040.zip
[Minor] Lemove legacy
-rw-r--r--src/libmime/message.c1
-rw-r--r--src/libmime/message.h13
-rw-r--r--src/libmime/mime_expressions.c20
3 files changed, 7 insertions, 27 deletions
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