From 27f7d2c8d25bf8ff60e0c113768056482d210f50 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 31 May 2024 00:43:20 +0300 Subject: [PATCH] engine: common: ban few more executable types for COM_IsSafeFileToDownload --- engine/common/common.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/engine/common/common.c b/engine/common/common.c index bf1441ab..4bf99751 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -25,16 +25,19 @@ GNU General Public License for more details. static const char *file_exts[] = { - "cfg", - "lst", - "exe", - "vbs", - "com", - "bat", - "dll", - "ini", - "log", - "sys", + // ban text files that don't make sense as resource + "cfg", "lst", "ini", "log", + + // ban Windows code + "exe", "vbs", "com", "bat", + "dll", "sys", "ps1", + + // ban common unix code + // NOTE: in unix anything can be executed as long it has access flag + "so", "sh", "dylib", + + // ban mobile archives + "apk", "ipa", }; #ifdef _DEBUG