[SPIGOT-7152] Using /kill on yourself while it's on an ItemStack's PDC causes the server to crash Created: 10/Sep/22 Updated: 25/Dec/24 Resolved: 12/Sep/22 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Optic_Fusion1 | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 1 |
Labels: | None |
Attachments: |
![]() |
Version: | CraftBukkit version 3580-Spigot-e53686f-5901d58 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
If a plugin uses the PlayerInteractEvent to execute commands that are stored on an ItemStack's PDC it works fine. HOWEVER if the command that gets executed is either kill @e[type=player] OR kill <your_player_name> and you execute it while in creative mode it causes a crash with the following exception: https://paste.md-5.net/eqaqupayeh.md. Another interesting thing is if you do player.setHealth(0) within the PlayerInteractEvent or even the two mentioned commands w/o it being on the PDC it works as expected. A temp fix is cancelling the PlayerInteractEvent, however on the off chance said fix is not applied then it should be fixed at the source. While this is limited to creative mode only, this is a possible exploit that could happen on creative mode servers. steps to replicate: Video of crash and steps taken to repoduce w/ the provided plugin: https://www.youtube.com/watch?v=EsS3ZH0d7Mw |
Comments |
Comment by mfnalex [ 10/Sep/22 ] |
Another thing I want to mention: on Paper `git-Paper-141 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 51183af)`, this does NOT happen. Everything works fine there. All versions mentioned are the latest as of right now. |
Comment by mfnalex [ 10/Sep/22 ] |
I can confirm that the .jar Optic_Fusion sent also crashes for me on Spigot `CraftBukkit version 3580-Spigot-e53686f-5901d58 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT)` and also on CraftBukkit `CraftBukkit version 3580-Bukkit-5901d58 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT)`
I wanna add this:
Here's the full stacktrace of the crash: ``` [05:37:02] Async Chat Thread - #2/INFO: [Not Secure] <mfnalex> ==test ``` |