Skip to content

Commit

Permalink
Unbind unsafe APIs (load/loadstring) in bbslua.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShikChen committed Jun 20, 2016
1 parent 524cced commit bd1a664
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mbbsd/bbslua.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,9 @@ bbsluaRegConst(lua_State *L)

// unbind unsafe API
lua_pushnil(L); lua_setglobal(L, "dofile");
lua_pushnil(L); lua_setglobal(L, "load");
lua_pushnil(L); lua_setglobal(L, "loadfile");
lua_pushnil(L); lua_setglobal(L, "loadstring");

// global
lua_pushcfunction(L, bl_print);
Expand Down

0 comments on commit bd1a664

Please sign in to comment.