Fix losing a item in ItemFrame upon interacting it on protected region you do not have access#3088
Conversation
return a item when a item frame was interacted in protected region you do not have permission with
|
Thanks for the pull request! I have a few suggestions, if you don't mind |
|
Why not just use the UpdateItemDrop (90) packet? In DropItemInstanced method from NPC.cs, the item slot is set to be unusable for 54000 frames after spawned, and then the item is set to inactive right after sending UpdateItemDrop. This eliminates sending a second packet afterwards and also replicates vanilla behavior for locally instanced items. |
Repeatedly rightclicking a blocked item frame would fill up the locked out slots (54000 frames is 900 seconds or 15 minutes) and allow a malicious client to prevent item drops from functioning on the server at all by locking out all slots. |
I see, thank you for the insight. |
Co-authored-by: Arthri <41360489+Arthri@users.noreply.github.com>
Co-authored-by: Arthri <41360489+Arthri@users.noreply.github.com>
|
Can someone update the wiki for this? |
this is the best thing i could come up with