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

A long enough chat message can corrupt the protocol. #1

Closed
purifetchi opened this issue Jul 25, 2023 · 1 comment
Closed

A long enough chat message can corrupt the protocol. #1

purifetchi opened this issue Jul 25, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@purifetchi
Copy link
Owner

purifetchi commented Jul 25, 2023

When you write a chat message close to the 64 character limit of classic, the server starts sending mangled packets completely corrupting the game for others.

Edit: Split the message after 64 bytes, the name prefix screws with the length.

@purifetchi purifetchi added the bug Something isn't working label Jul 25, 2023
@purifetchi purifetchi self-assigned this Jul 25, 2023
@SepiaChiptunes
Copy link

currently a 64 character message breaks the protocol when sent:

CLIENT SENDS: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
SERVER CONVERTS TO: <koy>: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

so then, on the serverside the message needs to be split into x amount of variables
(example shown is python but you can easily reimplement variables from Py to C#)

message_variable_1 = "<koy>: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
message_variable_2 = "> aaaa"

and send both the variables seperately back to the client(s):

CLIENT SENDS:    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

SERVER CONVERTS TO: <koy>: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

SERVER SENDS:       <koy>: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
SERVER SENDS:       > aaaa

hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants