aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-parser-inlinepgp-encrypted.c
diff options
context:
space:
mode:
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 ();