From 3d22f9b76bff4eae7c1cacf47de833f126117722 Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS Date: Thu, 28 Nov 2024 12:59:45 +0100 Subject: [PATCH] fix #5 make transform history non-global fixes #5 transformation history was shared by all users and kept growing as it was never truely reset. Every time a user used a banner a white background was dumped on top of the stack making it possible to crash the server through an overflow to core.serialize() function. --- init.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index af70ff0..18ae3ce 100644 --- a/init.lua +++ b/init.lua @@ -133,11 +133,10 @@ banners.creation_form = smartfs.create("banners:banner_creation", -- banner definition -banners.Banner = { - transforms = {} -} +banners.Banner = {} + function banners.Banner:new(banner) - banner = banner or {} + banner = banner or { transforms = {} } setmetatable(banner, self) self.__index = self return banner