Skip to content

Commit 9db2edc

Browse files
committed
Only get freezedata on found contests
We can't do a normal $contest==null check as that might leak information if someone doesn't have access.
1 parent c7d2b0a commit 9db2edc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webapp/src/Controller/API/ContestController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ public function problemsetAction(Request $request, string $cid): Response
364364

365365
$hasAccess = $this->dj->checkrole('jury') ||
366366
$this->dj->checkrole('api_reader') ||
367-
$contest->getFreezeData()->started();
367+
$contest?->getFreezeData()->started();
368368

369369
if (!$hasAccess) {
370370
throw new AccessDeniedHttpException();

0 commit comments

Comments
 (0)