From f3ea2af89745dcda5732176df06a10253b637d81 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Thu, 26 Oct 2017 00:21:17 +0200 Subject: [PATCH] application/octet-stream is not necessary pgp-signature --- envelope.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envelope.py b/envelope.py index 7ad3a33..e4330a3 100644 --- a/envelope.py +++ b/envelope.py @@ -73,7 +73,7 @@ def check(msg, GNUPG_DIRECTORY, beta=False): # Looking for signed content for part in msg.walk(): payload = part.get_payload() - if part.get_content_type() == "application/pgp-signature" or part.get_content_type() == "application/octet-stream" or ( + if part.get_content_type() == "application/pgp-signature" or ( payload is not None and not part.is_multipart() and part.get_payload(decode=True).find(b"-----BEGIN PGP SIGNATURE-----") >= 0 ): if part.get_content_type() != "application/pgp-signature":