I just made some tests.
First, I tested intllib alone in the Empty subgame (subgame without mods). It works.
Now I added one dependant mod: teletool.
And ta-da! The error appears. This is the error you asked for:
Code: Select all
2016-11-09 00:13:32: ERROR[Main]: ModError: Failed to load and run script from /home/wuzzy/src/minetest/git/minetest/bin/../mods/teletool/init.lua:
2016-11-09 00:13:32: ERROR[Main]: Attempt to access external file /home/wuzzy/src/minetest/git/minetest/bin/../mods/intllib/intllib.lua with mod security on.
2016-11-09 00:13:32: ERROR[Main]: stack traceback:
2016-11-09 00:13:32: ERROR[Main]: [C]: in function 'dofile'
2016-11-09 00:13:32: ERROR[Main]: .../src/minetest/git/minetest/bin/../mods/teletool/init.lua:3: in main chunk
2016-11-09 00:13:32: ERROR[Main]: Siehe debug.txt für Details.
Code: Select all
local S
if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
else
S = function ( s ) return s end
end
The offending code is quite obviously the “dofile”. This is a blatant violation of mod security because a file from outside the teletool mod is attempted to be loaded.
Oddly, this is not even the boilerplate code from the intllib README. But when I looked on earlier versions of intllib, the dofile was still there. Probably the code here was just copied from an older version of intllib.
When I use the new intllib boilerplate, it works fine. The fix is (luckily) quite simple.
But the “Oh crap!” part of this is that I have found many mods in my mod directory which currently contain the bad “dofile”:
Code: Select all
awards
food_sweet
homedecor
maptools
prehistoric_modpack
bedrock2
dice2
doc_minetest_game
hbarmor
hbhunger
hudbars
inventory_icon
magicbeans_w
mana
mtg_plus
orienteering
origin
pedology
pep
pseudonodes
returnmirror
teletool
tsm_surprise
wateringcan
But I have planned to do a Minetest mod release orgy in this or the next week anyway. I will “spam” the forums with mod updates at this time. So I am quite glad I found the bug BEFORE that. :-)