mirror of
https://github.com/glest/glest-source.git
synced 2025-10-02 18:36:48 +02:00
- added first round of security sandboxing for lua scripts (disable the os library)
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include <locale.h>
|
||||
#include "string_utils.h"
|
||||
#include "auto_test.h"
|
||||
#include "lua_script.h"
|
||||
|
||||
// To handle signal catching
|
||||
#if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__FreeBSD__) && !defined(BSD)
|
||||
@@ -3206,6 +3207,10 @@ int glestMain(int argc, char** argv) {
|
||||
Config &config = Config::getInstance();
|
||||
setupGameItemPaths(argc, argv, &config);
|
||||
|
||||
if(config.getBool("DisableLuaSandbox","false") == true) {
|
||||
LuaScript::setDisableSandbox(true);
|
||||
}
|
||||
|
||||
Socket::setBroadCastPort(config.getInt("BroadcastPort",intToStr(Socket::getBroadCastPort()).c_str()));
|
||||
|
||||
Socket::disableNagle = config.getBool("DisableNagle","false");
|
||||
|
Reference in New Issue
Block a user