diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-03-15 01:44:20 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-03-15 01:44:20 +0800 |
commit | 1df1d4aead3ebacf457f637c6df2a5e8539b7fbf (patch) | |
tree | 0d31b8877fc39052b20abc8434018ecaa1ef63c9 /camel/camel-mime-part.c | |
parent | 0b82cc7a34271a145a45ff7f296304e19a9315cc (diff) | |
download | gsoc2013-evolution-1df1d4aead3ebacf457f637c6df2a5e8539b7fbf.tar.gz gsoc2013-evolution-1df1d4aead3ebacf457f637c6df2a5e8539b7fbf.tar.zst gsoc2013-evolution-1df1d4aead3ebacf457f637c6df2a5e8539b7fbf.zip |
Use header_contentid_decode() as this new function should be safer than
2003-03-13 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-part.c (process_header): Use
header_contentid_decode() as this new function should be safer
than the hack that we had before.
* camel-mime-utils.c (header_contentid_decode): New function to
try and parse a content-id string in such a way as to work around
some of the known bugs in other MIME implementations. Try to be as
"safe" as we can - ie. don't allow for more than 1 @ (since the
mailer uses "@@@%d" as a fake content-id value for parts without
content-ids) and don't allow for invalid content-type chars.
svn path=/trunk/; revision=20295
Diffstat (limited to 'camel/camel-mime-part.c')
-rw-r--r-- | camel/camel-mime-part.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c index 11a024218b..ad09728c5f 100644 --- a/camel/camel-mime-part.c +++ b/camel/camel-mime-part.c @@ -234,21 +234,7 @@ process_header(CamelMedium *medium, const char *header_name, const char *header_ break; case HEADER_CONTENT_ID: g_free (mime_part->content_id); - if (!(mime_part->content_id = header_msgid_decode (header_value))) { - while (*header_value && strchr (" \t\r\n", *header_value)) - header_value++; - if (*header_value == '<') { - p = header_value; - while (*p && *p != '>') - p++; - mime_part->content_id = g_strndup (header_value, p - header_value); - } else if (*header_value) { - mime_part->content_id = g_strdup (header_value); - } - - if (mime_part->content_id) - g_strstrip (mime_part->content_id); - } + mime_part->content_id = header_contentid_decode (header_value); break; case HEADER_ENCODING: text = header_token_decode (header_value); |