Skip to content

Add idempotency and duplicate-submission protection #626

Description

@A6dulmalik

Priority: P0

Labels: backend, security, gameplay, priority: p0

Problem

A player could potentially submit the same answer multiple times because of:

  • double clicking
  • network retries
  • browser refresh
  • malicious requests
  • frontend bugs

This becomes especially dangerous when XP or rewards are involved.

Requirements

Implement idempotency for challenge submissions.

Example:

submissionId

or:

Idempotency-Key

The backend must ensure the same submission cannot:

award XP twice
advance the session twice
create duplicate rewards

Acceptance Criteria

  • Duplicate submissions are detected.
  • XP cannot be duplicated.
  • Reward eligibility cannot be duplicated.
  • Session cannot advance twice.
  • Tests cover repeated requests.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions