Creates a transparent sandboxed Lua environment for Minetest, restricting other mods' access to the OS, filesystem, and debug capabilities.
In order to use this mod, it must load before all other mods, including those in the Minetest game being loaded. To ensure this, make sure every mod has the depends.txt file in its base directory and that one of the lines in the file reads "security?". If this isn't done, not only will it break the security guarantees, but mods that load before this one may not be able to correctly access global variables.
This mod has no dependencies and provides no external API.
Comments and criticisms are welcome and encouraged. In fact, community support is essential for improving security. Try this with other mods and see if anything crashes. Report incompatibilities. Review the code, try to find holes and break the rules, and please report when you succeed.
Virtual Filesystem
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
/
|- tmp/
|- world/
|- mods/
|- mod1/
|- mod2/
|- mod3/
.
.
Mod Details
Required Minetest Version: 0.4.12 (likely to work in other versions, but not tested)
Dependencies: (none)
Reverse Dependencies: (all installed mods)
Copyright and Licensing
Author: Prestidigitator
License: WTFPL
Change History
Version 1.0
- Released 2015-04-11
- First working version, tested against luacmd, minetest_game, moretrees, and the plantslife modpack.
Version 1.1
- Whitelisted some extra LuaJIT and Minetest utility functions.
- Fixed io.flush typo.