Check correct voting in ballot.
It's possible that ballots get mixed up when
a voter is participating in more than one
voting and sending the ballots manually (by
copying and pasting them into his mail client).
UseVote could - and should! - check that the
ballot belongs to the current voting by comparing
the ballot introduction ("WAHLSCHEIN fuer ...")
with the votename and throw an error if they
don't match.
* Add ballotintro (default: WAHLSCHEIN fuer) and
tpl_wrong_voting (default: wrong-voting) to
usevote.cfg
* Add messages to messages.cfg
* Modify ballot and ballot-personal templates
accordingly
* Add check to uvvote.pl
* Add error handling to UVmenu.pm
* Change UVmenu::menu call in uvcfv.pl due
to new parameter ($voting)
Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
parent
fb9d3eb071
commit
b9f5201405
8 changed files with 56 additions and 7 deletions
4
uvcfv.pl
4
uvcfv.pl
|
|
@ -152,9 +152,9 @@ sub process_request {
|
|||
# check for suspicious addresses
|
||||
foreach my $element (@bad_addr) {
|
||||
if ($voter_addr =~ /^$element/) {
|
||||
my (@votes, @set, $ballot_id); # irrelevant, but necessary for UVmenu::menu()
|
||||
my (@votes, @set, $ballot_id, $voting); # irrelevant, but necessary for UVmenu::menu()
|
||||
my @errors = ('SuspiciousAccountBallot');
|
||||
my $res = UVmenu::menu(\@votes, \@header, $body, \$voter_addr, \$voter_name, \$ballot_id, \@set, \@errors);
|
||||
my $res = UVmenu::menu(\@votes, \@header, $body, \$voter_addr, \$voter_name, \$ballot_id, \$voting, \@set, \@errors);
|
||||
|
||||
# "Ignore": don't deliver a ballot
|
||||
return 0 if ($res eq 'i');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue