The _rankCandidates
is dynamically modified based on voter input, allowing voters to add unauthorized candidates.
The current implementation allows voters to add candidates dynamically to the candidate list during the election process at _rankCandidates()
, which leads to unauthorized or unintended candidates being added to the election.
The voting process can be compromised by allowing voters to include candidates who should not be part of the election.
Foundry Tests
Add this to your test suite, the test passes even if we add a random candidate:
Predefine a list of valid candidates during the election setup (constructor) to ensure only authorized candidates are part of the selection process.
Add specific candidate list at constructor with checks on zero addresses and duplicates
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.