mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-01-01 10:02:01 +00:00
修复测试用例下载中判断文件名的正则表达式的错误
This commit is contained in:
parent
75b7a74b17
commit
69cf91f5e2
@ -356,7 +356,7 @@ class TestCaseDownloadAPIView(APIView):
|
||||
if not test_case_id:
|
||||
return error_response(u"参数错误")
|
||||
# 防止URL./../../.上层目录遍历
|
||||
if not re.compile(r"^[1-9a-zA-Z]+$").match(test_case_id):
|
||||
if not re.compile(r"^[0-9a-zA-Z]+$").match(test_case_id):
|
||||
return error_response(u"参数错误")
|
||||
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user