Skip to content

Commit 92f5723

Browse files
committed
Disallow sending clarifications before the contest has started.
1 parent 4235363 commit 92f5723

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
@@ -198,6 +198,11 @@ public function addAction(
198198
}
199199

200200
$time = Utils::now();
201+
if ($contest->getStartTime() > $time) {
202+
throw new BadRequestHttpException(
203+
"Sending clarifications via API before the contest is not allowed."
204+
);
205+
}
201206
if ($timeString = $clarificationPost->time) {
202207
if ($this->isGranted('ROLE_API_WRITER')) {
203208
try {

0 commit comments

Comments
 (0)