feat: remove existence check before file type validation in thumbnail handler

This commit is contained in:
retoor 2024-12-03 20:50:32 +00:00
parent 5ce5796abb
commit 92d855dd2a

View File

@ -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.")