Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Properly determine the host of a chess game on initialization #234

Merged
merged 1 commit into from
Nov 26, 2023

Conversation

JFreegman
Copy link
Member

@JFreegman JFreegman commented Nov 26, 2023

We previously used the length of the invite packet to determine if we were the host of a chess game. This allowed a friend to send an invite packet with a length of zero to trick you into starting a game of chess with yourself as the host. The effect of this was just a broken game in which neither peer could make a move.

We now determine who the host is independently and in addition do more thorough packet size enforcement


This change is Reviewable

@JFreegman JFreegman added the bug Bug fix for the user, not a fix to a build script label Nov 26, 2023
@JFreegman JFreegman added this to the 0.12.x milestone Nov 26, 2023
@JFreegman JFreegman force-pushed the chess_fix branch 3 times, most recently from f7b0e73 to a9930e9 Compare November 26, 2023 05:28
We previously used the length of the invite packet to determine
if we were the host of a chess game. This allowed a friend to
send an invite packet with a length of zero to trick you into
starting a game of chess with yourself as the host. The effect
of this was just a broken game in which neither peer could make
a move.

We now determine who the host is independently and in addition
do more thorough packet size enforcement
Copy link
Member

@Green-Sky Green-Sky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@JFreegman JFreegman merged commit 03987f4 into TokTok:master Nov 26, 2023
8 checks passed
@JFreegman JFreegman deleted the chess_fix branch November 26, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fix for the user, not a fix to a build script
Development

Successfully merging this pull request may close these issues.

3 participants