Skip to content

Commit a82f294

Browse files
committed
修复越权访问
1 parent f51eb03 commit a82f294

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contest/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def contest_problem_page(request, contest_id, contest_problem_id):
359359
"""
360360
contest = Contest.objects.get(id=contest_id)
361361
try:
362-
problem = ContestProblem.objects.get(id=contest_problem_id, visible=True)
362+
problem = ContestProblem.objects.get(contest=contest, id=contest_problem_id, visible=True)
363363
except ContestProblem.DoesNotExist:
364364
return error_page(request, u"比赛题目不存在")
365365
warning = u"您已经提交过本题的正确答案,重复提交可能造成时间累计。"

0 commit comments

Comments
 (0)