diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-03-11 11:56:15 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-03-11 12:10:06 +0100 |
commit | 76c07f6d490ae01bb5610185f22b546fca9c06ea (patch) | |
tree | fe41a7fd951de723f2caa92597a5cccb99371685 | |
parent | 4ae83f4389684517659a2ba9d7fe5ee0c954b214 (diff) | |
download | remail-76c07f6d490ae01bb5610185f22b546fca9c06ea.tar.gz |
remail/mail: Add missing encrypted.asc filename
Assuming that there is a limited number of possible filenames is just
wrong. Add yet another one.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | remail/mail.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/remail/mail.py b/remail/mail.py index 03a8a93..92ee364 100644 --- a/remail/mail.py +++ b/remail/mail.py @@ -367,7 +367,7 @@ def msg_sanitize_outlook(msg): # Try to find the payload part which actually contains the # magically wrapped outlook GPG data. # Two variants: - # 1) msg.asc or msc.gpg provided as a plain attachement + # 1) random filenames provided as a plain attachement # without PGP envelope # 2) GpgOL_MIME_structure.txt contains a fully enveloped # PGP payload with the proper headers. @@ -377,8 +377,11 @@ def msg_sanitize_outlook(msg): if payload.get_content_type() != 'application/octet-stream': continue + fnames = ['msg.gpg', 'msg.asc', 'encrypted.asc', + 'GpgOL_MIME_structure.txt'] + fname = payload.get_filename(None) - if fname not in ['msg.gpg', 'msg.asc', 'GpgOL_MIME_structure.txt']: + if fname not in fnames: continue decode_base64(payload) |