1
0
mirror of https://github.com/pandorabox-io/banners.git synced 2025-01-06 16:10:32 +01:00

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.
This commit is contained in:
Luke aka SwissalpS 2024-11-28 12:59:45 +01:00
parent 78be1611c3
commit 3d22f9b76b

View File

@ -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