diff options
author | Jeija <norrepli@gmail.com> | 2016-02-19 21:14:38 +0100 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2016-02-19 18:50:42 -0500 |
commit | 1b9aef43c94a79ca58f488bbfee8c40ab5b5b5b0 (patch) | |
tree | 67cac1b9da3e8d06efd70a4971fc9cbaa643c13c | |
parent | 5f4ed94d90668af58a3e677e7401f0028871acce (diff) | |
download | minetest-1b9aef43c94a79ca58f488bbfee8c40ab5b5b5b0.tar.gz minetest-1b9aef43c94a79ca58f488bbfee8c40ab5b5b5b0.tar.bz2 minetest-1b9aef43c94a79ca58f488bbfee8c40ab5b5b5b0.zip |
Ignore spaces in secure.trusted_mods setting
-rw-r--r-- | src/script/lua_api/l_util.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp index c1e883a98..c04f09f90 100644 --- a/src/script/lua_api/l_util.cpp +++ b/src/script/lua_api/l_util.cpp @@ -388,6 +388,8 @@ int ModApiUtil::l_request_insecure_environment(lua_State *L) // Check secure.trusted_mods const char *mod_name = lua_tostring(L, -1); std::string trusted_mods = g_settings->get("secure.trusted_mods"); + trusted_mods.erase(std::remove(trusted_mods.begin(), + trusted_mods.end(), ' '), trusted_mods.end()); std::vector<std::string> mod_list = str_split(trusted_mods, ','); if (std::find(mod_list.begin(), mod_list.end(), mod_name) == mod_list.end()) { |