forked from wikimedia/mediawiki-php-luasandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
luasandbox.ini
23 lines (23 loc) · 1.03 KB
/
luasandbox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
extension=luasandbox.so
; Change luasandbox.ini_script to add or remove allowed globals and library functions.
; Additional libraries can me require'd.
; Default value:
; luasandbox.ini_script = "
;local function censor (filtered, filter)
; local all_allowed = filter['*']
; for field in pairs (filtered) do
; local allowed = filter [field]
; if not (allowed or all_allowed and allowed ~= false) then
; filtered [field] = nil
; elseif type (allowed) == 'table' then
; censor (filtered [field], allowed)
; end
; end
;end
;censor (_G, {
; _G = true, _VERSION = true, print = true, assert = true, error = true, getfenv = true, setfenv = true, pcall = true, xpcall = true,
; ipairs = true, next = true, pairs = true, select = true, unpack = true,
; getmetatable = true, setmetatable = true, rawequal = true, rawget = true, rawset = true,
; type = true, tonumber = true, tostring = true, table = true, math = true,
; os = {date = true, difftime = true, time = true, clock = true}, debug = {traceback = true}, string = {['*'] = true, dump = false}
;})