Skip to content

Commit e97738e

Browse files
committed
fix: 修复漏洞
1 parent 2f883a4 commit e97738e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/storages/alist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ async def express(self, hash: str, request: web.Request, response) -> Dict[str,
125125
data = await res.json()
126126
if data["code"] != 200:
127127
response = web.HTTPNotFound()
128-
await response.prepare(request)
129128
return {"bytes": 0, "hits": 0}
130129
try:
131130
response = web.HTTPFound(data["data"]["raw_url"])
132131
response.headers["x-bmclapi-hash"] = hash
133132
logger.debug(data)
134133
logger.debug(response)
134+
await response.prepare(request)
135135
return {"bytes": data["data"]["size"], "hits": 1}
136136
except Exception as e:
137137
response = web.HTTPError(text=e)

0 commit comments

Comments
 (0)