diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-09-05 20:08:51 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2015-05-16 18:32:31 -0400 |
commit | 3a8c7888807e4483bbdb3edd81c9893f3e2f427d (patch) | |
tree | 81f339e5f61b03e8d7842e06f034d09bf59dba96 /src/script/lua_api/l_settings.cpp | |
parent | f26421228bbd31f02bf16b45a4b82be84f233e52 (diff) | |
download | minetest-3a8c7888807e4483bbdb3edd81c9893f3e2f427d.tar.gz minetest-3a8c7888807e4483bbdb3edd81c9893f3e2f427d.tar.bz2 minetest-3a8c7888807e4483bbdb3edd81c9893f3e2f427d.zip |
Add mod security
Due to compatibility concerns, this is temporarily disabled.
Diffstat (limited to 'src/script/lua_api/l_settings.cpp')
-rw-r--r-- | src/script/lua_api/l_settings.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/lua_api/l_settings.cpp b/src/script/lua_api/l_settings.cpp index 9c88a3e05..35b82b435 100644 --- a/src/script/lua_api/l_settings.cpp +++ b/src/script/lua_api/l_settings.cpp @@ -19,6 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "lua_api/l_settings.h" #include "lua_api/l_internal.h" +#include "cpp_api/s_security.h" #include "settings.h" #include "log.h" @@ -188,6 +189,7 @@ int LuaSettings::create_object(lua_State* L) { NO_MAP_LOCK_REQUIRED; const char* filename = luaL_checkstring(L, 1); + CHECK_SECURE_PATH_OPTIONAL(L, filename); LuaSettings* o = new LuaSettings(filename); *(void **)(lua_newuserdata(L, sizeof(void *))) = o; luaL_getmetatable(L, className); |