> > > Why can't i dofile() in freeciv? > > > > The usage of such commands is restricted due to security implications. > > You can not load a lua file! Only default.lua and script.lua are read. > > Or you have to use the command 'lua file <...>' (I think it is named > > luafile in S2_3). > > In S2_3 there is only lua that executes a line of lua code. There is no > functionality to load a file, I'll try to backport it to my repo > tomorrow. > > > Frankly, I dont understand how that helps with security. If you are the > administrator you can do anything anyway, so why restrict yourself? > Could you please provide a scenario when dofile can lead to something > nasty?
This restriction is a long time thing for freeciv. This prevents bad script from doing nasty things, or do you check all scripts you run (new rulesets, etc)? Also, not everybody who runs a server is an admin and knows what can happen if there is something hidden in a script file. _______________________________________________ Freeciv-dev mailing list Freecivfirstname.lastname@example.org https://mail.gna.org/listinfo/freeciv-dev