mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/tglx/remail.git
synced 2024-12-28 05:20:56 +01:00
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>
This commit is contained in:
parent
4ae83f4389
commit
76c07f6d49
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue