dcs-retribution/resources/scripts/MissionScripting.original.lua
Dan Albert 39fae9effc Update MissionScripting.original.lua.
We don't really even need this. Some cleanup of the replacer could just
keep the original contents in memory, but this will do for now.
2021-10-21 15:50:52 -07:00

23 lines
614 B
Lua

--Initialization script for the Mission lua Environment (SSE)
dofile('Scripts/ScriptingSystem.lua')
--Sanitize Mission Scripting environment
--This makes unavailable some unsecure functions.
--Mission downloaded from server to client may contain potentialy harmful lua code that may use these functions.
--You can remove the code below and make availble these functions at your own risk.
local function sanitizeModule(name)
_G[name] = nil
package.loaded[name] = nil
end
do
sanitizeModule('os')
sanitizeModule('io')
sanitizeModule('lfs')
_G['require'] = nil
_G['loadlib'] = nil
_G['package'] = nil
end