Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-06-13 14:56:01 +0300
committerJoas Schilling <coding@schilljs.com>2022-06-13 14:56:01 +0300
commit55bb6c066cb4132bc083079fc84a5310185f39e2 (patch)
treece6bec4bde169002f9099b58af3d7860c2839ae5 /lib
parentec24253ca490f58be16d2b5b08ab6213da6918cb (diff)
Don't allow updating/voting after closingfeature/noid/simple-polls
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/PollController.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Controller/PollController.php b/lib/Controller/PollController.php
index 9ed4c305f..fdf6277d3 100644
--- a/lib/Controller/PollController.php
+++ b/lib/Controller/PollController.php
@@ -155,6 +155,10 @@ class PollController extends AEnvironmentAwareController {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
+ if ($poll->getStatus() === Poll::STATUS_CLOSED) {
+ return new DataResponse([], Http::STATUS_BAD_REQUEST);
+ }
+
try {
$votedSelf = $this->pollService->votePoll($this->participant, $poll, $optionIds);
} catch (\RuntimeException $e) {