Skip to content

Commit d7e9638

Browse files
committed
fix: 修复漏洞
1 parent e2215e1 commit d7e9638

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/router.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from core.utils import checkSign
44
from core.api import getStatus
55
from core.storages import AListStorage
6+
from core.logger import logger
67
from typing import Union
78
from aiohttp import web
89
import aiohttp
@@ -23,7 +24,7 @@ def init(self) -> None:
2324
@self.route.get("/download/{hash}")
2425
async def _(
2526
request: web.Request,
26-
) -> Union[web.Response, web.FileResponse, web.StreamResponse]:
27+
) -> web.Response:
2728
self.connection += 1
2829
writeAgent(request.headers["User-Agent"], 1)
2930
file_hash = request.match_info.get("hash", "").lower()
@@ -37,6 +38,7 @@ async def _(
3738
self.counters["bytes"] += data["bytes"]
3839
self.counters["hits"] += data["hits"]
3940
self.connection -= 1
41+
logger.debug(response)
4042
return response
4143

4244
@self.route.get("/measure/{size}")

0 commit comments

Comments
 (0)