fix bug where multipart/alternative messages would slip through without being scanned
authorPaul Mangan <paul@claws-mail.org>
Thu, 10 Jul 2003 10:54:08 +0000 (10:54 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 10 Jul 2003 10:54:08 +0000 (10:54 +0000)
ChangeLog.claws
configure.ac
src/plugins/clamav/clamav_plugin.c

index 3a7ed07..dd3e271 100644 (file)
@@ -1,3 +1,9 @@
+2003-07-10 [paul]      0.9.0claws95
+
+       * src/plugins/clamav/clamav_plugin.c
+               fix bug where multipart/alternative messages
+               would slip through without being scanned
+
 2003-07-10 [christoph] 0.9.0claws94
 
        * src/folder.c
index e6b3e65..9d5326c 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws94
+EXTRA_VERSION=claws95
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index bbbed00..c6ee1d5 100644 (file)
@@ -57,16 +57,6 @@ static PrefParam param[] = {
        {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
 
-#define IS_FIRST_PART_TEXT(info) \
-       ((info->mime_type == MIME_TEXT || info->mime_type == MIME_TEXT_HTML || \
-         info->mime_type == MIME_TEXT_ENRICHED) || \
-        (info->mime_type == MIME_MULTIPART && info->content_type && \
-         !strcasecmp(info->content_type, "multipart/alternative") && \
-         (info->children && \
-          (info->children->mime_type == MIME_TEXT || \
-           info->children->mime_type == MIME_TEXT_HTML || \
-           info->children->mime_type == MIME_TEXT_ENRICHED))))
-
 static gboolean mail_filtering_hook(gpointer source, gpointer data)
 {
        MailFilteringData *mail_filtering_data = (MailFilteringData *) source;
@@ -97,16 +87,13 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
        if (!mimeinfo) return FALSE;
 
        child = mimeinfo->children;
-       if (!child || IS_FIRST_PART_TEXT(mimeinfo)) {
+       if (!child) {
                procmime_mimeinfo_free_all(mimeinfo);
                return FALSE;
        }
 
        debug_print("Scanning message %d for viruses\n", msginfo->msgnum);
 
-       if (IS_FIRST_PART_TEXT(child))
-               child = child->next;
-
        infile = procmsg_get_message_file_path(msginfo);
 
 
@@ -183,8 +170,6 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
        return is_infected;
 }
 
-#undef IS_FIRST_PART_TEXT
-
 ClamAvConfig *clamav_get_config(void)
 {
        return &config;