add handling for ChestSizeSync packet#3275
add handling for ChestSizeSync packet#3275lost-werewolf wants to merge 6 commits intoPryaxis:general-develfrom
Conversation
Greptile SummaryThis PR adds a handler for the Key changes:
The implementation is largely solid — the off-by-one and force-kick concerns noted in earlier review threads have been addressed. The remaining minor points are the absence of a plugin hook (unlike comparable handlers such as Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Client sends SyncChestSize\nid, newSize] --> B{id < 0 or\nid >= Main.maxChests?}
B -- Yes --> C[return true\nsilently drop]
B -- No --> D{Main.chest id\nis null?}
D -- Yes --> E[Log debug\nreturn true]
D -- No --> F{Player\nIsBeingDisabled?}
F -- Yes --> G[Log + SendData revert\nreturn true]
F -- No --> H{Player\nIsBouncerThrottled?}
H -- Yes --> I[Log + SendData revert\nreturn true]
H -- No --> J{Has permission\nresizechests?}
J -- No --> K[Log + Kick\n'Exploit attempt'\nreturn true]
J -- Yes --> L{HasBuildPermission\nchest.x, chest.y?}
L -- No --> M[Log + SendData revert\nreturn true]
L -- Yes --> N{newSize < 0?}
N -- Yes --> O[Log + SendData revert\nreturn true]
N -- No --> P[return false\nallow vanilla handling]
Last reviewed commit: ef2efb2 |
|
I have a question,can a normal player send resize packet? |
No, hence why I decided to permission lock it and reject by default otherwise. It has genuine use cases for people who would want it, since it can be easier to do something on a modified game client rather than adding a command to a plugin & then running that. After all, there's some settings that do allow modified clients to do stuff (such as invalid place styles) |
Co-authored-by: lost-werewolf <sebmartinpersonal@gmail.com>
|
@greptile-apps review |
This adds handling and a permission for the chest size sync packet (155), due to a reported potential memory leak being caused by "chests and items" in the Pryaxis discord.
ReLogic, why do you add these kinds of things and then don't make sure only the server can send them?