Skip to content

Commit a6d7f77

Browse files
committed
fix: 修复漏洞
1 parent f1b684e commit a6d7f77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/storages/local.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async def express(
8989
path = os.path.join(self.path, hash[:2], hash)
9090
if not os.path.exists(path):
9191
response = web.HTTPNotFound()
92-
response
92+
return response
9393
try:
9494
file_size = os.path.getsize(path)
9595
response = web.FileResponse(path, status=200)
@@ -98,9 +98,9 @@ async def express(
9898
counter["hits"] += 1
9999
return response
100100
except Exception as e:
101+
response = web.HTTPError(text=e)
101102
logger.debug(e)
102-
return
103-
103+
return response
104104
async def recycleFiles(self, files: FileList) -> None:
105105
delete_files = []
106106

0 commit comments

Comments
 (0)