Skip to content

Bug: Unauthenticated user can join another guest game via URL and edit their code #2351

Description

@CrabPigeon

Summary

An unauthenticated user can open another guest's Simple Battle by changing the game id in the URL and edit that player's code

Reproduction steps

1. Go to https://codebattle.hexlet.io/ in an incognito window (User A, not logged in)
2. Click "Try simple battle"
3. Copy the game URL (example: https://codebattle.hexlet.io/games/XXXXXX)
4. Open second incognito window (User B, not logged in)
5. Paste the same URL
6. Click at User A editor and type any text

Expected result

User B should be spectator only, or should not join a guest's game at all. The editor must stay read-only

Actual result

User B joins the game as a participant and can change user A code

Image

Browsers

Firefox

OS

Windows

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions