Skip to content

Commit 93132ff

Browse files
committed
Disallow sending clarifications before the contest has started.
1 parent 4fe3abd commit 93132ff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

webapp/src/Controller/API/ClarificationController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ public function addAction(
202202
if ($this->isGranted('ROLE_API_WRITER')) {
203203
try {
204204
$time = Utils::toEpochFloat($timeString);
205+
if ($contest->getStartTime() > $time) {
206+
throw new BadRequestHttpException(
207+
"Sending clarifications before the contest is only possible via the UI."
208+
);
209+
}
205210
} catch (Exception) {
206211
throw new BadRequestHttpException(sprintf("Can not parse time '%s'.", $timeString));
207212
}

0 commit comments

Comments
 (0)