From 78e86966fcca06119d5972255eb11e014aaf6c3d Mon Sep 17 00:00:00 2001 From: "marcel.kocisek" Date: Mon, 9 Mar 2026 17:40:04 +0100 Subject: [PATCH] Add basename for checking validation --- server/mergin/sync/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/mergin/sync/utils.py b/server/mergin/sync/utils.py index 03e7a94c..9e89eb7c 100644 --- a/server/mergin/sync/utils.py +++ b/server/mergin/sync/utils.py @@ -509,7 +509,8 @@ def check_skip_validation(file_path: str) -> bool: Check if we can skip validation for this file path. Some files are allowed even if they have forbidden extension or mime type. """ - return file_path in Configuration.UPLOAD_FILES_WHITELIST + file_name = os.path.basename(file_path) + return file_name in Configuration.UPLOAD_FILES_WHITELIST FORBIDDEN_MIME_TYPES = {