From 92d855dd2a16ffc98bbc41154d363b525765ee16 Mon Sep 17 00:00:00 2001 From: retoor Date: Tue, 3 Dec 2024 20:50:32 +0000 Subject: [PATCH] feat: remove existence check before file type validation in thumbnail handler --- src/rupload/app.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/rupload/app.py b/src/rupload/app.py index 30d526f..2b37b5b 100644 --- a/src/rupload/app.py +++ b/src/rupload/app.py @@ -273,9 +273,6 @@ async def handle_thumbnail(request: web.Request): safe_path = pathlib.Path(path) - if not safe_path.exists(): - return web.Response(status=404, text="File not found.") - if not safe_path.is_file(): return web.Response(status=400, text="Invalid file type.")