Security problem(Please help me)

Post Reply
annguyenvan
New member
Posts: 6
Joined: Sat Jan 10, 2026 18:33
GitHub: NguyenVanThinhAn
IRC: rick
In-game: clack

Security problem(Please help me)

by annguyenvan » Post

Hello everyone, I'm working on a mod for the engine I'm developing. However, I'm getting a security error, even though I've declared it in minetest.conf and rebuilt it so the dylib recognizes it.

Image

Image

User avatar
Krock
Developer
Posts: 4713
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Security problem(Please help me)

by Krock » Post

Example usage in your mod:

Code: Select all

local ie = core.request_insecure_environment()
ie.require("your_dylib_library_or_whatever.dylib")

ie.io.open("/path/that/you/couldnt/access.txt")
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

annguyenvan
New member
Posts: 6
Joined: Sat Jan 10, 2026 18:33
GitHub: NguyenVanThinhAn
IRC: rick
In-game: clack

Re: Security problem(Please help me)

by annguyenvan » Post

Krock wrote:
Sat Jan 10, 2026 21:30
Example usage in your mod:

Code: Select all

local ie = core.request_insecure_environment()
ie.require("your_dylib_library_or_whatever.dylib")

ie.io.open("/path/that/you/couldnt/access.txt")
Does that mean the engine doesn't allow requiring C/C++ files? Because the way I connect Lua to C/C++ is the same as you described.

User avatar
Blockhead
Moderator
Posts: 2834
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: Security problem(Please help me)

by Blockhead » Post

Luanti mods do not ordinarily touch native code. To add more capabilities, if you really need them, one should use external Lua modules like this mod.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests