-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
use vanilla limit for KnownPacks #1425
Conversation
vanilla has not limit for it in latest, its limit is the limit of the collection decode so its 65535
This is also limited as a security measure and not only to match vanilla behaviour. View #1303 for details. |
65536 is as secure as 64 You cant make the server go out of memory with an array of the size 65536. Every sting in velocity can be that size the limit is only about preventing sending Integer.MAX_VALUE as size, but such small values are secure anyway |
it is about the packs and not the size of packs. |
okay what risks do i encounter if the limit is at 65536, compared to 64? |
as the data is limited to 2 mb or 6 mb with compression anyways there is litrally no security risk with using the vanilla limit here |
Also i think you don't understand its about the array allocation and not the KnownPacks amount itself Just so you can understand better 65536 is 30517,57 times smaller, so it cant cause any out of memory errors or performace issues |
Its still in the latest vanilla version. You are looking at clientbound limit, but there are also a serverbound one. |
You are right, my friend send me the wrong packet.
|
At least I understand it correctly now, thanks |
No need to close this PR, KnownPacksPacket is used for both clientbound and serverbound directions, so this change is still useful (but should be changed to affect only clientbound direction). |
vanilla has not limit for it in latest, its limit is the limit of the collection decode so its 65536