From d2acbc51189ba87607b0b9a7deda8cd806ea5fdc Mon Sep 17 00:00:00 2001 From: Niezan Date: Tue, 23 Jul 2024 12:28:43 -0700 Subject: [PATCH] Circuit component blueprint name validation fix (#6615) --- code/modules/integrated_electronics/core/saved_circuits.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/integrated_electronics/core/saved_circuits.dm b/code/modules/integrated_electronics/core/saved_circuits.dm index b9735835f9e..5b4b8e72735 100644 --- a/code/modules/integrated_electronics/core/saved_circuits.dm +++ b/code/modules/integrated_electronics/core/saved_circuits.dm @@ -53,7 +53,7 @@ /obj/item/integrated_circuit/proc/verify_save(list/component_params) var/init_name = initial(name) // Validate name - if(component_params["name"] && component_params["name"] != sanitizeName(component_params["name"])) + if(component_params["name"] && component_params["name"] != sanitizeSafe(component_params["name"], MAX_MESSAGE_LEN, 0, 0)) return "Bad component name at [init_name]." // Validate input values @@ -145,7 +145,7 @@ // Returns null on success, error name on failure /obj/item/electronic_assembly/proc/verify_save(list/assembly_params) // Validate name and color - if(assembly_params["name"] && assembly_params["name"] != sanitizeName(assembly_params["name"])) + if(assembly_params["name"] && assembly_params["name"] != sanitizeSafe(assembly_params["name"], MAX_MESSAGE_LEN, 0, 0)) return "Bad assembly name." if(assembly_params["desc"] && !reject_bad_text(assembly_params["desc"])) return "Bad assembly description."