|
|
|
@ -42,6 +42,8 @@ import java.io.FileOutputStream;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.io.InputStream;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Locale;
|
|
|
|
|
import java.util.Objects;
|
|
|
|
@ -76,6 +78,26 @@ public class EntityAttachment {
|
|
|
|
|
|
|
|
|
|
static final String VCARD_PREFIX = BuildConfig.APPLICATION_ID + ".vcard.";
|
|
|
|
|
|
|
|
|
|
// https://support.google.com/mail/answer/6590#zippy=%2Cmessages-that-have-attachments
|
|
|
|
|
static final List<String> DANGEROUS_EXTENSIONS = Collections.unmodifiableList(Arrays.asList(
|
|
|
|
|
"ade", "adp", "apk", "appx", "appxbundle",
|
|
|
|
|
"bat",
|
|
|
|
|
"cab", "chm", "cmd", "com", "cpl",
|
|
|
|
|
"dll", "dmg",
|
|
|
|
|
"ex", "ex_", "exe",
|
|
|
|
|
"hta",
|
|
|
|
|
"ins", "isp", "iso",
|
|
|
|
|
"jar", "js", "jse",
|
|
|
|
|
"lib", "lnk",
|
|
|
|
|
"mde", "msc", "msi", "msix", "msixbundle", "msp", "mst",
|
|
|
|
|
"nsh",
|
|
|
|
|
"pif", "ps1",
|
|
|
|
|
"rdp", // https://www.microsoft.com/en-us/security/blog/2024/10/29/midnight-blizzard-conducts-large-scale-spear-phishing-campaign-using-rdp-files/
|
|
|
|
|
"scr", "sct", "shb", "sys",
|
|
|
|
|
"vb", "vbe", "vbs", "vxd",
|
|
|
|
|
"wsc", "wsf", "wsh"
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
@PrimaryKey(autoGenerate = true)
|
|
|
|
|
public Long id;
|
|
|
|
|
public String section;
|
|
|
|
|