From 5f01e058b0ca53d573cd15be829169eef4e2af05 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 4 Nov 2021 10:53:26 +0000 Subject: [PATCH] [MIRROR] [s] Fixes an exploit that allowed players to spawn arbitrary paths [MDB IGNORE] (#9220) * [s] Fixes an exploit that allowed players to spawn arbitrary paths (#62561) * [s] Fixes an exploit that allowed players to spawn arbitrary paths Co-authored-by: CocaColaTastesGood <47264839+CocaColaTastesGood@users.noreply.github.com> --- code/datums/components/religious_tool.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/datums/components/religious_tool.dm b/code/datums/components/religious_tool.dm index 89e172e8eb3..94e7b9e82c0 100644 --- a/code/datums/components/religious_tool.dm +++ b/code/datums/components/religious_tool.dm @@ -117,6 +117,9 @@ /// Select the sect, called from [/datum/component/religious_tool/proc/AttemptActions] /datum/component/religious_tool/proc/select_sect(mob/living/user, path) + if(!ispath(text2path(path), /datum/religion_sect)) + message_admins("[ADMIN_LOOKUPFLW(usr)] has tried to spawn an item when selecting a sect.") + return if(user.mind.holy_role != HOLY_ROLE_HIGHPRIEST) to_chat(user, "You are not the high priest, and therefore cannot select a religious sect.") return @@ -138,6 +141,9 @@ /// Perform the rite, called from [/datum/component/religious_tool/proc/AttemptActions] /datum/component/religious_tool/proc/perform_rite(mob/living/user, path) + if(!ispath(text2path(path), /datum/religion_rites)) + message_admins("[ADMIN_LOOKUPFLW(usr)] has tried to spawn an item when performing a rite.") + return if(user.mind.holy_role == HOLY_ROLE_DEACON) to_chat(user, "You are merely a deacon of [GLOB.deity], and therefore cannot perform rites.") return