MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaRemoveUnsupportedFunctions

Function luaRemoveUnsupportedFunctions

app/redis-6.2.6/src/scripting.c:1075–1080  ·  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

1073/* Remove a functions that we don't want to expose to the Redis scripting
1074 * environment. */
1075void luaRemoveUnsupportedFunctions(lua_State *lua) {
1076 lua_pushnil(lua);
1077 lua_setglobal(lua,"loadfile");
1078 lua_pushnil(lua);
1079 lua_setglobal(lua,"dofile");
1080}
1081
1082/* This function installs metamethods in the global table _G that prevent
1083 * the creation of globals accidentally.

Callers 1

scriptingInitFunction · 0.85

Calls 2

lua_setglobalFunction · 0.85
lua_pushnilFunction · 0.50

Tested by

no test coverage detected