Merge pull request #1014 from Yawet330/secfix2

yippee - I spent 2 hours looking for security exploits
This commit is contained in:
BongaTheProto
2023-12-13 22:44:13 -05:00
committed by GitHub
@@ -40,13 +40,13 @@
return TRUE
/obj/structure/closet/secure_closet/genpop/proc/handle_edit_sentence(mob/user)
var/prisoner_name = input(user, "Please input the name of the prisoner.", "Prisoner Name", registered_id.registered_name) as text|null
var/prisoner_name = sanitize(input(user, "Please input the name of the prisoner.", "Prisoner Name", registered_id.registered_name) as text|null)
if(prisoner_name == null | !user.Adjacent(src))
return FALSE
var/sentence_length = input(user, "Please input the length of their sentence in minutes (0 for perma).", "Sentence Length", registered_id.sentence) as num|null
if(sentence_length == null | !user.Adjacent(src))
return FALSE
var/crimes = input(user, "Please input their crimes.", "Crimes", registered_id.crime) as text|null
var/crimes = sanitize(input(user, "Please input their crimes.", "Crimes", registered_id.crime) as text|null)
if(crimes == null | !user.Adjacent(src))
return FALSE