Skip to content

Commit d5d9d99

Browse files
Do not expose submission data for hidden teams on public scoreboard
1 parent bc44652 commit d5d9d99

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

webapp/src/Controller/PublicController.php

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

332332
$scoreboard = $this->scoreboardService->getScoreboard($contest);
333+
$teamIds = array_map(fn(Team $team) => $team->getTeamid(), $scoreboard->getTeamsInDescendingOrder());
333334

334335
/** @var Submission[] $submissions */
335336
$submissions = $this->submissionService->getSubmissionList(
336337
[$contest->getCid() => $contest],
337-
restrictions: new SubmissionRestriction(valid: true),
338+
restrictions: new SubmissionRestriction(
339+
teamIds: $teamIds,
340+
valid: true,
341+
),
338342
paginated: false
339343
)[0];
340344

0 commit comments

Comments
 (0)