MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaRemoveUnsupportedFunctions

Function luaRemoveUnsupportedFunctions

src/scripting.cpp:1091–1096  ·  view source on GitHub ↗

Remove a functions that we don't want to expose to the Redis scripting * environment. */

Source from the content-addressed store, hash-verified

1089/* Remove a functions that we don't want to expose to the Redis scripting
1090 * environment. */
1091void luaRemoveUnsupportedFunctions(lua_State *lua) {
1092 lua_pushnil(lua);
1093 lua_setglobal(lua,"loadfile");
1094 lua_pushnil(lua);
1095 lua_setglobal(lua,"dofile");
1096}
1097
1098/* This function installs metamethods in the global table _G that prevent
1099 * the creation of globals accidentally.

Callers 1

scriptingInitFunction · 0.85

Calls 1

lua_pushnilFunction · 0.85

Tested by

no test coverage detected