mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 17:15:21 +02:00
Add mod security
Due to compatibility concerns, this is temporarily disabled.
This commit is contained in:
@@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "lua_api/l_vmanip.h"
|
||||
#include "common/c_converter.h"
|
||||
#include "common/c_content.h"
|
||||
#include "cpp_api/s_security.h"
|
||||
#include "util/serialize.h"
|
||||
#include "server.h"
|
||||
#include "environment.h"
|
||||
@@ -1031,6 +1032,10 @@ int ModApiMapgen::l_generate_decorations(lua_State *L)
|
||||
int ModApiMapgen::l_create_schematic(lua_State *L)
|
||||
{
|
||||
INodeDefManager *ndef = getServer(L)->getNodeDefManager();
|
||||
|
||||
const char *filename = luaL_checkstring(L, 4);
|
||||
CHECK_SECURE_PATH_OPTIONAL(L, filename);
|
||||
|
||||
Map *map = &(getEnv(L)->getMap());
|
||||
Schematic schem;
|
||||
|
||||
@@ -1069,8 +1074,6 @@ int ModApiMapgen::l_create_schematic(lua_State *L)
|
||||
}
|
||||
}
|
||||
|
||||
const char *filename = luaL_checkstring(L, 4);
|
||||
|
||||
if (!schem.getSchematicFromMap(map, p1, p2)) {
|
||||
errorstream << "create_schematic: failed to get schematic "
|
||||
"from map" << std::endl;
|
||||
|
Reference in New Issue
Block a user