mirror of
https://github.com/minetest/minetest.git
synced 2025-07-05 01:10:22 +02:00
Add unittest that lints builtin JSON files
This commit is contained in:
@ -659,6 +659,13 @@ bool ScriptApiSecurity::checkPathWithGamedef(lua_State *L,
|
||||
}
|
||||
}
|
||||
|
||||
// Allow read-only access to builtin
|
||||
if (!write_required) {
|
||||
str = fs::AbsolutePath(Server::getBuiltinLuaPath());
|
||||
if (!str.empty() && fs::PathStartsWith(abs_path, str))
|
||||
return true;
|
||||
}
|
||||
|
||||
// Allow read-only access to game directory
|
||||
if (!write_required) {
|
||||
const SubgameSpec *game_spec = gamedef->getGameSpec();
|
||||
|
Reference in New Issue
Block a user