Commit 3e9dcec3 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Reject multiline ballots

parent 387b7154
......@@ -189,6 +189,9 @@ module MakeBallotBox (P : Signatures.ELECTION_PARAMS) (E : LWT_ELECTION) = struc
| None -> true
in
if not voting_open then fail ElectionClosed else return () >>
if String.contains rawballot '\n' then (
fail (Serialization (Invalid_argument "multiline ballot"))
) else return () >>
lwt ballot =
try Lwt.return (
Serializable_j.ballot_of_string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment