Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
e621c601
Commit
e621c601
authored
Feb 22, 2017
by
Stephane Glondu
Browse files
Check presence of voters before generating credentials on server
parent
69627b1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/web/web_site.ml
View file @
e621c601
...
...
@@ -784,8 +784,11 @@ let () =
Any
.
register
~
service
:
election_setup_credentials_server
(
handle_setup
(
fun
se
()
_
uuid
->
if
List
.
length
se
.
se_voters
>
!
maxmailsatonce
then
let
nvoters
=
List
.
length
se
.
se_voters
in
if
nvoters
>
!
maxmailsatonce
then
Lwt
.
fail
(
Failure
(
Printf
.
sprintf
"Cannot send credentials, there are too many voters (max is %d)"
!
maxmailsatonce
))
else
if
nvoters
=
0
then
Lwt
.
fail
(
Failure
"No voters"
)
else
if
se
.
se_public_creds_received
then
forbidden
()
else
let
()
=
se
.
se_metadata
<-
{
se
.
se_metadata
with
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment