If we are kludging around a inline-pgp signed part, do some charset
2001-10-22 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-mime.c (camel_pgp_mime_part_verify): If we are kludging around a inline-pgp signed part, do some charset conversion to protect any 8bit text. svn path=/trunk/; revision=13896
This commit is contained in:
committed by
Jeffrey Stedfast
parent
739e7cd1da
commit
b80a058e55
@ -1,3 +1,9 @@
|
||||
2001-10-22 Jeffrey Stedfast <fejj@ximian.com>
|
||||
|
||||
* camel-pgp-mime.c (camel_pgp_mime_part_verify): If we are
|
||||
kludging around a inline-pgp signed part, do some charset
|
||||
conversion to protect any 8bit text.
|
||||
|
||||
2001-10-22 <NotZed@Ximian.com>
|
||||
|
||||
* camel-filter-search.c, camel-folder-search.c (check_header): Use
|
||||
|
||||
@ -1027,7 +1027,7 @@ pgp_verify (CamelCipherContext *ctx, CamelCipherHash hash, CamelStream *istream,
|
||||
|
||||
desc = outbuf = g_new (unsigned char, outlen + 1);
|
||||
|
||||
locale = e_iconv_locale_charset();
|
||||
locale = e_iconv_locale_charset ();
|
||||
if (!locale)
|
||||
locale = "iso-8859-1";
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
#include "camel-mime-message.h"
|
||||
#include "camel-mime-filter-from.h"
|
||||
#include "camel-mime-filter-crlf.h"
|
||||
#include "camel-mime-filter-charset.h"
|
||||
#include "camel-stream-filter.h"
|
||||
#include "camel-stream-mem.h"
|
||||
#include "camel-stream-fs.h"
|
||||
@ -373,11 +374,30 @@ camel_pgp_mime_part_verify (CamelPgpContext *context, CamelMimePart *mime_part,
|
||||
camel_object_unref (CAMEL_OBJECT (crlf_filter));
|
||||
camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (from_filter));
|
||||
camel_object_unref (CAMEL_OBJECT (from_filter));
|
||||
|
||||
|
||||
type = camel_mime_part_get_content_type (mime_part);
|
||||
if (header_content_type_param (type, "x-inline-pgp-hack"))
|
||||
if (header_content_type_param (type, "x-inline-pgp-hack")) {
|
||||
/* this is a kludge around inline pgp signatures - basically,
|
||||
the multipart/signed is faked - the original part (aka part #1)
|
||||
is the original mime part and the signature is a copy of the
|
||||
signature in part #1 */
|
||||
CamelMimeFilterCharset *charset_filter;
|
||||
CamelContentType *content_type;
|
||||
const char *charset;
|
||||
|
||||
content_type = camel_mime_part_get_content_type (part);
|
||||
charset = header_content_type_param (content_type, "charset");
|
||||
if (charset) {
|
||||
charset_filter = camel_mime_filter_charset_new_convert ("utf-8", charset);
|
||||
if (charset_filter) {
|
||||
camel_stream_filter_add (filtered_stream,
|
||||
CAMEL_MIME_FILTER (charset_filter));
|
||||
camel_object_unref (CAMEL_OBJECT (charset_filter));
|
||||
}
|
||||
}
|
||||
|
||||
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
|
||||
else
|
||||
} else
|
||||
wrapper = CAMEL_DATA_WRAPPER (part);
|
||||
camel_data_wrapper_write_to_stream (wrapper, CAMEL_STREAM (filtered_stream));
|
||||
camel_object_unref (CAMEL_OBJECT (filtered_stream));
|
||||
|
||||
Reference in New Issue
Block a user