From b98af57ec5c3589780bbe6b7e0bd652d56995832 Mon Sep 17 00:00:00 2001 From: boatbomber Date: Mon, 12 Feb 2024 22:19:00 -0800 Subject: [PATCH] Validate settings type before passing them to set --- plugin/src/HeadlessAPI.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/src/HeadlessAPI.lua b/plugin/src/HeadlessAPI.lua index 6a4cdbb5..b9174109 100644 --- a/plugin/src/HeadlessAPI.lua +++ b/plugin/src/HeadlessAPI.lua @@ -350,6 +350,7 @@ function API.new(app) Rojo._apiDescriptions.SetSetting = "Sets a Rojo setting" function Rojo:SetSetting(setting: string, value: any) assert(type(setting) == "string", "Setting must be type `string`") + assert(type(value) == type(Settings:get(setting)), "Value must be the same type as the setting") if Rojo:_checkRateLimit("SetSetting") then return