From f8fe0768b001fced1163c37907985584fd29280a Mon Sep 17 00:00:00 2001 From: Rykka Stormheart Date: Tue, 7 Feb 2023 09:19:15 -0800 Subject: [PATCH] Earlyports #14459 from VORE, properly sanitizes heat/cold messages Credit goes to Seris, not me, just earlyporting. https://github.com/VOREStation/VOREStation/pull/14459 --- .../modules/client/preference_setup/vore/07_traits.dm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index 0537f54eaa..268eec7fcd 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -156,6 +156,17 @@ pref.custom_ask = lowertext(trim(pref.custom_ask)) pref.custom_exclaim = lowertext(trim(pref.custom_exclaim)) + if(islist(pref.custom_heat)) //don't bother checking these for actual singular message length, they should already have been checked and it'd take too long every time it's sanitized + if(length(pref.custom_heat) > 10) + pref.custom_heat.Cut(11) + else + pref.custom_heat = list() + if(islist(pref.custom_cold)) + if(length(pref.custom_cold) > 10) + pref.custom_cold.Cut(11) + else + pref.custom_cold = list() + /datum/category_item/player_setup_item/vore/traits/copy_to_mob(var/mob/living/carbon/human/character) character.custom_species = pref.custom_species