Skip to content

Commit 2447195

Browse files
committed
Return 404 if not yet access to submission data
Note that we do this check before verifying the existence of team or problem, s.t. we do not leak any information.
1 parent 0c7db21 commit 2447195

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

webapp/src/Controller/PublicController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,11 @@ public function submissionsDataAction(Request $request, ?string $teamId, ?string
330330
}
331331

332332
$scoreboard = $this->scoreboardService->getScoreboard($contest);
333+
334+
if (!$scoreboard) {
335+
throw $this->createNotFoundException('No submission data found');
336+
}
337+
333338
$teamIds = array_map(fn(Team $team) => $team->getTeamid(), $scoreboard->getTeamsInDescendingOrder());
334339

335340
/** @var Submission[] $submissions */

0 commit comments

Comments
 (0)