修正漏洞,避免配置文件泄露
This commit is contained in:
parent
db961deace
commit
5a72550598
@ -168,7 +168,8 @@ def fileDownload(path):
|
|||||||
f.seek(offset)
|
f.seek(offset)
|
||||||
for row in f:
|
for row in f:
|
||||||
yield row
|
yield row
|
||||||
|
if not (".mp4" in path or ".flv" in path):
|
||||||
|
return Response(status=404)
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
if "RANGE" in request.headers:
|
if "RANGE" in request.headers:
|
||||||
offset = int(request.headers["RANGE"].replace("=", "-").split("-")[1].strip())
|
offset = int(request.headers["RANGE"].replace("=", "-").split("-")[1].strip())
|
||||||
|
Reference in New Issue
Block a user