Skip to content

Invalid candidate IDs are silently dropped from the tally #25

Description

@HellFelix

If a submitted vote contains an out-of-bounds candidate index, that selection is silently omitted from the tally. The POST /api/voter/submit call returns HTTP 200, so the voter believes their vote was accepted — but their selection was not counted. This is a data-integrity issue that directly undermines voter trust.

File: rustsystem-server/src/vote_auth.rs:45-47

} else {
    warn!("Vote contains invalid candidate id: {candidate_id}");
}

Fix: Reject the submission with an appropriate error before recording any part of the vote, or validate candidate indices before accepting.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    HighHigh priorityUXRelated to the user experience

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions