From 6c0362a4cf093b47147efd98ea5988f4ff28b630 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 22 Jul 2025 12:56:17 +0100 Subject: [PATCH] fix: replace secure_filename with safe_filename for attachment handling --- application/api/user/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/api/user/routes.py b/application/api/user/routes.py index 221cb64e..0d35b8ca 100644 --- a/application/api/user/routes.py +++ b/application/api/user/routes.py @@ -3557,7 +3557,7 @@ class StoreAttachment(Resource): try: attachment_id = ObjectId() - original_filename = secure_filename(os.path.basename(file.filename)) + original_filename = safe_filename(os.path.basename(file.filename)) relative_path = f"{settings.UPLOAD_FOLDER}/{user}/attachments/{str(attachment_id)}/{original_filename}" metadata = storage.save_file(file, relative_path)