From 1e35ba864fb269398a88a14d5fcd6ff338b24ab3 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Wed, 1 Jun 2022 11:59:58 -0500 Subject: [PATCH] Add back access check --- judge/views/submission.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/judge/views/submission.py b/judge/views/submission.py index c52da75..c196445 100644 --- a/judge/views/submission.py +++ b/judge/views/submission.py @@ -753,6 +753,11 @@ class UserContestSubmissions(ForceContestMixin, UserProblemSubmissions): self.contest.name, ) + def access_check(self, request): + super(UserContestSubmissions, self).access_check(request) + if not self.contest.users.filter(user_id=self.profile.id).exists(): + raise Http404() + def get_content_title(self): if self.problem.is_accessible_by(self.request.user): return format_html(