修复测试用例下载中判断文件名的正则表达式的错误

This commit is contained in:
virusdefender 2016-04-07 17:14:48 +08:00
parent 75b7a74b17
commit 69cf91f5e2

View File

@ -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: