aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-parser-inlinepgp-signed.c
diff options
context:
space:
mode:
Diffstat (limited to 'em-format/e-mail-parser-inlinepgp-signed.c')
-rw-r--r--em-format/e-mail-parser-inlinepgp-signed.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/em-format/e-mail-parser-inlinepgp-signed.c b/em-format/e-mail-parser-inlinepgp-signed.c
index 2b11d6e412..fb65e5c447 100644
--- a/em-format/e-mail-parser-inlinepgp-signed.c
+++ b/em-format/e-mail-parser-inlinepgp-signed.c
@@ -66,6 +66,11 @@ empe_inlinepgp_signed_parse (EMailParserExtension *extension,
GError *local_error = NULL;
GByteArray *ba;
+ if (g_cancellable_is_cancelled (cancellable) ||
+ /* avoid recursion */
+ (part_id->str && part_id->len > 17 && g_str_has_suffix (part_id->str, ".inlinepgp_signed")))
+ return FALSE;
+
cipher = camel_gpg_context_new (e_mail_parser_get_session (parser));
/* Verify the signature of the message */