Add warning when disabling secure.enable_security (#9943)
authorrubenwardy <rw@rubenwardy.com>
Sat, 20 Jun 2020 12:21:38 +0000 (13:21 +0100)
committerGitHub <noreply@github.com>
Sat, 20 Jun 2020 12:21:38 +0000 (13:21 +0100)
src/script/scripting_server.cpp

index cbf22964015b2b55b9503aabe443c75a9ab90ae3..85411ded460e5f68b885014544f94d068c72219d 100644 (file)
@@ -62,6 +62,10 @@ ServerScripting::ServerScripting(Server* server):
 
        if (g_settings->getBool("secure.enable_security")) {
                initializeSecurity();
+       } else {
+               warningstream << "\\!/ Mod security should never be disabled, as it allows any mod to "
+                               << "access the host machine."
+                               << "Mods should use minetest.request_insecure_environment() instead \\!/" << std::endl;
        }
 
        lua_getglobal(L, "core");