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

The string dilemna #78

Closed
roblabla opened this issue Mar 16, 2014 · 1 comment · Fixed by #178
Closed

The string dilemna #78

roblabla opened this issue Mar 16, 2014 · 1 comment · Fixed by #178

Comments

@roblabla
Copy link
Member

Right now, we have two string types, string and ustring. The former is limited to 255 characters, while the other isn't limited at all. The whole problem is, minecraft limits the length of certain fields to a certain amount of characters. Generally speaking, the limit is 255 characters, but that is not always the case.

Unfortunately, this has caused many issues in the library in the past, where a field would be marked as a "string" when it could receive input longer than 255 characters. To make matters worse, wiki.vg doesn't really give much insight in which fields are limited in length.

I suggest we simply remove the limit from the packets entirely. It should be the user's responsibility to make sure the other side doesn't give unwanted input, and thus sanitize the input.

@rom1504
Copy link
Member

rom1504 commented May 23, 2015

It seems all client->server string are limited.
A fix to this would be adding a "length" typearg to the string type and having it default to infinity (useful for server->client string fields)

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

Successfully merging a pull request may close this issue.

2 participants