[s] Fixes an exploit that allowed players to spawn arbitrary paths (#62561)

This commit is contained in:
CocaColaTastesGood
2021-11-03 15:09:39 -07:00
committed by GitHub
parent 1a5a16a3bc
commit b75cd20b6d
+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