application/octet-stream is not necessary pgp-signature

This commit is contained in:
nemunaire 2017-10-26 00:21:17 +02:00
parent 5d8a7ab834
commit f3ea2af897
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ def check(msg, GNUPG_DIRECTORY, beta=False):
# Looking for signed content # Looking for signed content
for part in msg.walk(): for part in msg.walk():
payload = part.get_payload() 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 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": if part.get_content_type() != "application/pgp-signature":