lua: sandbox: relax the sandbox to allow more functionality in scripts

This enables the debug and coroutine libraries and some more functions
that are not really so risky to have around

Related to #121
This commit is contained in:
George Kiagiadakis
2022-04-06 18:05:26 +03:00
parent 9387ce0d95
commit 031bc65c20
2 changed files with 43 additions and 70 deletions

View File

@@ -24,7 +24,7 @@ _wplua_openlibs (lua_State *L)
static const luaL_Reg loadedlibs[] = {
{"_G", luaopen_base},
{LUA_LOADLIBNAME, luaopen_package},
/* {LUA_COLIBNAME, luaopen_coroutine}, */
{LUA_COLIBNAME, luaopen_coroutine},
{LUA_TABLIBNAME, luaopen_table},
/* {LUA_IOLIBNAME, luaopen_io}, */
{LUA_OSLIBNAME, luaopen_os},