summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_util.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2016-12-05 19:59:15 +0000
committerparamat <mat.gregory@virginmedia.com>2016-12-20 06:34:04 +0000
commit59f84ca0a07e50dd5ce050d38ae1aeb529bd25ac (patch)
treed5717ed5f89542bcc26b4291ba193b2890763b01 /src/script/lua_api/l_util.cpp
parent24edfb77afbb631cb83d26a095b609850f997e5c (diff)
downloadminetest-59f84ca0a07e50dd5ce050d38ae1aeb529bd25ac.tar.gz
minetest-59f84ca0a07e50dd5ce050d38ae1aeb529bd25ac.tar.bz2
minetest-59f84ca0a07e50dd5ce050d38ae1aeb529bd25ac.zip
Mod security: Allow read-only access to all mod paths
Diffstat (limited to 'src/script/lua_api/l_util.cpp')
-rw-r--r--src/script/lua_api/l_util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp
index 818c1aeeb..26e2b985c 100644
--- a/src/script/lua_api/l_util.cpp
+++ b/src/script/lua_api/l_util.cpp
@@ -388,7 +388,7 @@ int ModApiUtil::l_mkdir(lua_State *L)
{
NO_MAP_LOCK_REQUIRED;
const char *path = luaL_checkstring(L, 1);
- CHECK_SECURE_PATH_OPTIONAL(L, path);
+ CHECK_SECURE_PATH(L, path, true);
lua_pushboolean(L, fs::CreateAllDirs(path));
return 1;
}
@@ -400,7 +400,7 @@ int ModApiUtil::l_get_dir_list(lua_State *L)
const char *path = luaL_checkstring(L, 1);
short is_dir = lua_isboolean(L, 2) ? lua_toboolean(L, 2) : -1;
- CHECK_SECURE_PATH_OPTIONAL(L, path);
+ CHECK_SECURE_PATH(L, path, false);
std::vector<fs::DirListNode> list = fs::GetDirListing(path);