aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_security.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/cpp_api/s_security.cpp')
-rw-r--r--src/script/cpp_api/s_security.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_security.cpp b/src/script/cpp_api/s_security.cpp
index a6c5114b2..f68cd1777 100644
--- a/src/script/cpp_api/s_security.cpp
+++ b/src/script/cpp_api/s_security.cpp
@@ -98,6 +98,7 @@ void ScriptApiSecurity::initializeSecurity()
"type",
"unpack",
"_VERSION",
+ "vector",
"xpcall",
};
static const char *whitelist_tables[] = {
@@ -254,6 +255,10 @@ void ScriptApiSecurity::initializeSecurity()
lua_pushnil(L);
lua_setfield(L, old_globals, "core");
+ // 'vector' as well.
+ lua_pushnil(L);
+ lua_setfield(L, old_globals, "vector");
+
lua_pop(L, 1); // Pop globals_backup
@@ -296,6 +301,7 @@ void ScriptApiSecurity::initializeSecurityClient()
"type",
"unpack",
"_VERSION",
+ "vector",
"xpcall",
// Completely safe libraries
"coroutine",