Skip to content

Commit 78e8696

Browse files
committed
Add basename for checking validation
1 parent 2d89c38 commit 78e8696

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

server/mergin/sync/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,8 @@ def check_skip_validation(file_path: str) -> bool:
509509
Check if we can skip validation for this file path.
510510
Some files are allowed even if they have forbidden extension or mime type.
511511
"""
512-
return file_path in Configuration.UPLOAD_FILES_WHITELIST
512+
file_name = os.path.basename(file_path)
513+
return file_name in Configuration.UPLOAD_FILES_WHITELIST
513514

514515

515516
FORBIDDEN_MIME_TYPES = {

0 commit comments

Comments
 (0)