[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>
This commit is contained in:
SkyratBot
2021-11-04 10:53:26 +00:00
committed by GitHub
parent ed6d58f68f
commit 5f01e058b0
+6
View File
@@ -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, "<span class='warning'>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, "<span class='warning'>You are merely a deacon of [GLOB.deity], and therefore cannot perform rites.")
return