blob: 55b8c07303c70de710f0b0b189295c95467f406d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
From c81811577adc7003b6917e9b22c8a9cdd769fc24 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 10 May 2010 12:23:03 +0000
Subject: Bug #617510 - Displays source of a message sent by RoadSync 5
---
diff --git a/camel/camel-exchange-folder.c b/camel/camel-exchange-folder.c
index c45243a..abbad0b 100644
--- a/camel/camel-exchange-folder.c
+++ b/camel/camel-exchange-folder.c
@@ -423,6 +423,22 @@ get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
if (!ba)
return NULL;
+ while ((ba->len > 10 && g_str_has_prefix ((const gchar *)ba->data, "MAIL FROM:")) ||
+ (ba->len > 8 && g_str_has_prefix ((const gchar *)ba->data, "RCPT TO:")) ||
+ (ba->len > 2 && (ba->data[0] == '\n' || ba->data[1] == '\n'))) {
+ guint i;
+
+ i = 0;
+ while (i < ba->len && ba->data[i] != '\n')
+ i++;
+
+ if (i < ba->len)
+ g_byte_array_remove_range (ba, 0, i + 1);
+ else
+ break;
+ }
+
+
stream = camel_stream_mem_new_with_byte_array (ba);
crlffilter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
--
cgit v0.8.3.1
|