Skip to content

fix(arena): validate match topic against server-side verification allowlist#3941

Open
ionfwsrijan wants to merge 1 commit into
PankajSingh34:mainfrom
ionfwsrijan:fix/3936-match-verification-topic-allowlist
Open

fix(arena): validate match topic against server-side verification allowlist#3941
ionfwsrijan wants to merge 1 commit into
PankajSingh34:mainfrom
ionfwsrijan:fix/3936-match-verification-topic-allowlist

Conversation

@ionfwsrijan

Copy link
Copy Markdown
Collaborator

Summary

Added server-side topic allowlist to reject match code verification for non-algorithm topics.

Problem

Match code verification only checked for Array/String types but didn't validate the topic. For non-algorithm topics (e.g., math, general), verification would incorrectly pass or fail based on type alone.

Fix

Added a VERIFIED_TOPICS set containing topics that support code verification (algorithms, dsa, coding). The server now rejects match requests for topics not in this set, returning a clear error message.

Changed

  • arena-socket-server/index.js: Added VERIFIED_TOPICS set and validation before accepting match codes

Fixes #3936

…owlist

Only Arrays and Strings topics had verification test cases. Any other
topic value from the client bypassed verification completely, allowing a
user to claim a win without solving the problem. This change validates
the topic against a server-side allowlist and rejects matches for
unverified topics.

Fixes PankajSingh34#3936
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

@ionfwsrijan is attempting to deploy a commit to the Pankaj singh's projects Team on Vercel.

A member of the Team first needs to authorize it.

@ionfwsrijan

Copy link
Copy Markdown
Collaborator Author

@ezManish Please review this

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Match Code Verification Only Covers Two Topics

1 participant