Fix print() exposed to the Luacontroller

This commit is contained in:
number Zero 2018-07-23 13:16:01 +03:00
parent f61b1affea
commit ae0c6149b0
1 changed files with 4 additions and 0 deletions

View File

@ -198,7 +198,11 @@ end
-------------------------
local function safe_print(param)
local string_meta = getmetatable("")
local sandbox = string_meta.__index
string_meta.__index = string -- Leave string sandbox temporarily
print(dump(param))
string_meta.__index = sandbox -- Restore string sandbox
end
local function safe_date()