lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Am 01.05.2014 um 19:14 schrieb Thiago L. <fakedme@gmail.com>:

> Lua is powerful but it needs more (string metatable) sandboxing... In Lua 5.1 it's possible but in Lua 5.2 it's completely impossible...
> My idea to fix it? Lua states in Lua states!
> Each Lua state can have its own string metatable, so all you would do is newstate(), then use state._G (or state._ENV) to access the global _ENV (aka _G) and other state.stuff to access other stuff... (state.stringmetatable or something to access the string metatable)
> 
> Please? I've been trying to sandbox string metatables since I started messing with Lua D:
> 


I am bit late into the game, but there is also the proxy module at https://github.com/mbalmer/luaproxy

proxy allows you to manipulate data in another state from one state

- mb