From a0df4b0c23b762db74d855aac0c75a9eadf3d7a1 Mon Sep 17 00:00:00 2001 From: Jack Eilles Date: Fri, 22 Dec 2023 16:09:46 +0000 Subject: [PATCH] fix secure_filename error --- app/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index 913e5e5..9e627ea 100644 --- a/app/routes.py +++ b/app/routes.py @@ -64,7 +64,7 @@ def getData(id): if Config.files.find_one({"id": id}) is not None: data = Config.files.find_one({"id": id}) - with open(secure_filename(os.path.join(Config.fileDir, id)), "rb") as f: + with open(os.path.join(Config.fileDir, secure_filename(id)), "rb") as f: file = f.read() # Get MIME type from file, if fails then use magic