mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Update library notes
This commit is contained in:
parent
e899599034
commit
5b9f3e95ee
1 changed files with 4 additions and 7 deletions
|
@ -114,11 +114,7 @@ void PluginController::openLibrariesFor(lua_State *L,
|
||||||
// Stuff to change, remove or hide behind a permission system:
|
// Stuff to change, remove or hide behind a permission system:
|
||||||
static const std::vector<luaL_Reg> loadedlibs = {
|
static const std::vector<luaL_Reg> loadedlibs = {
|
||||||
luaL_Reg{LUA_GNAME, luaopen_base},
|
luaL_Reg{LUA_GNAME, luaopen_base},
|
||||||
// - print - writes to stdout, should be replaced with a per-plugin log
|
// - load - don't allow in release mode
|
||||||
// - load, loadstring, loadfile, dofile - don't allow bytecode, *require* valid utf8 (which bytecode by design isn't)
|
|
||||||
|
|
||||||
// luaL_Reg{LUA_LOADLIBNAME, luaopen_package},
|
|
||||||
// - explicit fs access, probably best to make our own require() function
|
|
||||||
|
|
||||||
//luaL_Reg{LUA_COLIBNAME, luaopen_coroutine},
|
//luaL_Reg{LUA_COLIBNAME, luaopen_coroutine},
|
||||||
// - needs special support
|
// - needs special support
|
||||||
|
@ -132,9 +128,10 @@ void PluginController::openLibrariesFor(lua_State *L,
|
||||||
luaL_Reg{LUA_STRLIBNAME, luaopen_string},
|
luaL_Reg{LUA_STRLIBNAME, luaopen_string},
|
||||||
luaL_Reg{LUA_MATHLIBNAME, luaopen_math},
|
luaL_Reg{LUA_MATHLIBNAME, luaopen_math},
|
||||||
luaL_Reg{LUA_UTF8LIBNAME, luaopen_utf8},
|
luaL_Reg{LUA_UTF8LIBNAME, luaopen_utf8},
|
||||||
// luaL_Reg{LUA_DBLIBNAME, luaopen_debug},
|
|
||||||
// - this allows the plugin developer to unleash all hell
|
|
||||||
};
|
};
|
||||||
|
// Warning: Do not add debug library to this, it would make the security of
|
||||||
|
// this a living nightmare due to stuff like registry access
|
||||||
|
// - Mm2PL
|
||||||
|
|
||||||
for (const auto ® : loadedlibs)
|
for (const auto ® : loadedlibs)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue