From 69cf91f5e2e918466500c927c065e406d1e31500 Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Thu, 7 Apr 2016 17:14:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E4=B8=8B=E8=BD=BD=E4=B8=AD=E5=88=A4=E6=96=AD=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E7=9A=84=E6=AD=A3=E5=88=99=E8=A1=A8=E8=BE=BE?= =?UTF-8?q?=E5=BC=8F=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problem/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problem/views.py b/problem/views.py index a85a87c7..ba6bf180 100644 --- a/problem/views.py +++ b/problem/views.py @@ -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: