PurpurMC / Purpur

Purpur is a drop-in replacement for Paper servers designed for configurability, and new fun and exciting gameplay features.
https://purpurmc.org
MIT License
2.02k stars 358 forks source link

Fix bee count payload lag/crash exploit and make it configurable. #1489

Closed dexuby closed 7 months ago

dexuby commented 7 months ago

Just a quick fix. This is generally a questionable feature, nothing about it is documented and it validates nearly nothing. Players can spam custom payload packets targeting locations anywhere in the world causing chunk loads resulting in freezing.

YouHaveTrouble commented 7 months ago

If we're fixing things, let's fix them correctly. This shouldn't work unless player is in the range of the debug targeting range. This would prevent this becoming NoCom 2.0

dexuby commented 7 months ago

A range check would be nice but I'm generally not too sure why this feature is necessary and what it's being used for (found nothing in the docs) so I didn't implement one. So this is being used by a Purpur mod to render some extra info?

YouHaveTrouble commented 7 months ago

Yep. it's for PurpurClient feature that displays the bee count in F3 menu

dexuby commented 7 months ago

Thanks, implemented a range limit of 16 now, that seems to be the max range when targeting blocks.

granny commented 7 months ago

GitHub CLI fucked up when I tried pushing to your PR so I've gone ahead and just merged the branch that was unintentionally created. Your changes have been merged.