修复测试用例下载中判断文件名的正则表达式的错误
This commit is contained in:
@@ -356,7 +356,7 @@ class TestCaseDownloadAPIView(APIView):
|
|||||||
if not test_case_id:
|
if not test_case_id:
|
||||||
return error_response(u"参数错误")
|
return error_response(u"参数错误")
|
||||||
# 防止URL./../../.上层目录遍历
|
# 防止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"参数错误")
|
return error_response(u"参数错误")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user