OWASP / OWASP/cornucopia

Players can vote on cards game time/before/after completed rounds/finished game

Open
#2,568 10 comments 0 reactions 1 assignee Claimed by @khushal-winner View on GitHub
bug copi.owasp.org elixir help wanted
Dominant language
Python
Stars
146
Forks
97
Avg merge
1d 8h
Merged PRs (30d)
103

Description

**Describe the bug**
Players can vote on any dealt_card by guessing/submitting its ID ***(from the console)** — even before the game starts, or after it ends. Backend `toggle_vote` handler lacks validation and even in completed rounds just from card id. Player can manipulate the data by voting or unvoting the cards after the game ends, if player partner with another player they can share their car ids and manipulate the data later or even before the game starts

**Expected behavior**
Voting must be allowed **only when** the game is active (`started_at` is set **and** `finished_at` is `nil`).

**Desktop (please complete the following information):**
OS: any
Browser: any
Version: any

**Additional context**
Critical missing server-side checks in `handle_event("toggle_vote", …)`:
- No check of game lifecycle (`started_at` / `!finished_at`)

**Are you going to work on fixing this?**

- [x] Yes
- [ ] No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.