mirror of
https://github.com/pandorabox-io/banners.git
synced 2025-01-08 17: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:
parent
78be1611c3
commit
3d22f9b76b
7
init.lua
7
init.lua
@ -133,11 +133,10 @@ banners.creation_form = smartfs.create("banners:banner_creation",
|
|||||||
|
|
||||||
|
|
||||||
-- banner definition
|
-- banner definition
|
||||||
banners.Banner = {
|
banners.Banner = {}
|
||||||
transforms = {}
|
|
||||||
}
|
|
||||||
function banners.Banner:new(banner)
|
function banners.Banner:new(banner)
|
||||||
banner = banner or {}
|
banner = banner or { transforms = {} }
|
||||||
setmetatable(banner, self)
|
setmetatable(banner, self)
|
||||||
self.__index = self
|
self.__index = self
|
||||||
return banner
|
return banner
|
||||||
|
Loading…
Reference in New Issue
Block a user