When encode is not possible, assume it's already bytes, so return it raw with a warning
This commit is contained in:
parent
8f7d6e79c5
commit
a52c756159
@ -44,7 +44,11 @@ def assume_rfc3156(msg):
|
|||||||
|
|
||||||
def assume_oldstyle(payload):
|
def assume_oldstyle(payload):
|
||||||
yield MailTest("Found BEGIN PGP SIGNED MESSAGE: message treated as old style PGP email.")
|
yield MailTest("Found BEGIN PGP SIGNED MESSAGE: message treated as old style PGP email.")
|
||||||
|
try:
|
||||||
yield payload.encode()
|
yield payload.encode()
|
||||||
|
except:
|
||||||
|
yield MailTest("Non-armored signed message discovered. Avoid using binary message over SMTP (see RFC2015 #2. PGP data formats).", 2)
|
||||||
|
yield payload
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user