From 866a06a248edd355eaf87bce598192633dc033da Mon Sep 17 00:00:00 2001 From: oranges Date: Thu, 22 Jun 2023 19:35:57 +1200 Subject: [PATCH] Fix a href exploit in limbgrower (#76247) This could be used to spoof category which may then be useable to inject html into the tgui or into vv All credit to @powerfulbacon https://github.com/BeeStation/BeeStation-Hornet/pull/9274 --- code/game/machinery/limbgrower.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm index 6f9332cca95..5f8d7020569 100644 --- a/code/game/machinery/limbgrower.dm +++ b/code/game/machinery/limbgrower.dm @@ -185,7 +185,10 @@ use_power(power) flick("limbgrower_fill", src) icon_state = "limbgrower_idleon" - selected_category = params["active_tab"] + var/temp_category = params["active_tab"] + if( ! (temp_category in categories) ) + return FALSE //seriously come on + selected_category = temp_category addtimer(CALLBACK(src, PROC_REF(build_item), consumed_reagents_list), production_speed * production_coefficient) return TRUE