From e06bc80172f3472fefdb646eb3bd475fe0c0e4b4 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 4 Feb 2021 13:45:15 -0700 Subject: [PATCH] [s] Sanitizes modular console ID edits (#56657) Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com> --- code/modules/modular_computers/file_system/programs/card.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/modular_computers/file_system/programs/card.dm b/code/modules/modular_computers/file_system/programs/card.dm index 4a11c471854..a0575869b40 100644 --- a/code/modules/modular_computers/file_system/programs/card.dm +++ b/code/modules/modular_computers/file_system/programs/card.dm @@ -177,7 +177,7 @@ if("PRG_edit") if(!computer || !authenticated || !target_id_card) return - var/new_name = params["name"] + var/new_name = reject_bad_name(params["name"]) // if reject bad name fails, the edit will just not go through instead of discarding all input, as new_name would be blank. if(!new_name) return target_id_card.registered_name = new_name @@ -192,7 +192,7 @@ return if(target == "Custom") - var/custom_name = params["custom_name"] + var/custom_name = reject_bad_name(params["custom_name"]) // if reject bad name fails, the edit will just not go through, as custom_name would be empty if(custom_name) target_id_card.assignment = custom_name target_id_card.update_label()