aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-parser-inlinepgp-encrypted.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-01-11 03:29:50 +0800
committerMilan Crha <mcrha@redhat.com>2013-01-11 03:31:01 +0800
commit9468fc2f6b7f2c689dc35f7617b4a91d1bb04993 (patch)
treec5bb2a4868063b7e71529bd9532fab6eb3b91c83 /em-format/e-mail-parser-inlinepgp-encrypted.c
parentb1ed35f70d09601717e32eb5c762f79908b0bcf8 (diff)
downloadgsoc2013-evolution-9468fc2f6b7f2c689dc35f7617b4a91d1bb04993.tar
gsoc2013-evolution-9468fc2f6b7f2c689dc35f7617b4a91d1bb04993.tar.gz
gsoc2013-evolution-9468fc2f6b7f2c689dc35f7617b4a91d1bb04993.tar.bz2
gsoc2013-evolution-9468fc2f6b7f2c689dc35f7617b4a91d1bb04993.tar.lz
gsoc2013-evolution-9468fc2f6b7f2c689dc35f7617b4a91d1bb04993.tar.xz
gsoc2013-evolution-9468fc2f6b7f2c689dc35f7617b4a91d1bb04993.tar.zst
gsoc2013-evolution-9468fc2f6b7f2c689dc35f7617b4a91d1bb04993.zip
Be more strict in inline PGP mime filter/part parser
Diffstat (limited to 'em-format/e-mail-parser-inlinepgp-encrypted.c')
-rw-r--r--em-format/e-mail-parser-inlinepgp-encrypted.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/em-format/e-mail-parser-inlinepgp-encrypted.c b/em-format/e-mail-parser-inlinepgp-encrypted.c
index 885f9151e6..624452c8b0 100644
--- a/em-format/e-mail-parser-inlinepgp-encrypted.c
+++ b/em-format/e-mail-parser-inlinepgp-encrypted.c
@@ -61,6 +61,11 @@ empe_inlinepgp_encrypted_parse (EMailParserExtension *extension,
GList *head, *link;
GError *local_error = NULL;
+ if (g_cancellable_is_cancelled (cancellable) ||
+ /* avoid recursion */
+ (part_id->str && part_id->len > 20 && g_str_has_suffix (part_id->str, ".inlinepgp_encrypted")))
+ return FALSE;
+
cipher = camel_gpg_context_new (e_mail_parser_get_session (parser));
opart = camel_mime_part_new ();