1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-25 01:06:04 +00:00

Prevent downloading of sub attachments

This commit is contained in:
M66B 2020-10-18 11:03:29 +02:00
parent 1cef1236af
commit 4fd8d5c48f

View file

@ -1448,6 +1448,8 @@ class Core {
attachment = db.attachment().getAttachment(message.id, (int) id); // legacy
if (attachment == null)
throw new IllegalArgumentException("Local attachment not found");
if (attachment.subsequence != null)
throw new IllegalArgumentException("Download of sub attachment");
if (attachment.available)
return;
@ -2093,6 +2095,7 @@ class Core {
parts.getWarnings(message.warning));
for (EntityAttachment attachment : parts.getAttachments())
if (attachment.subsequence == null)
parts.downloadAttachment(context, attachment);
if (message.received > account.created)