mirror of
https://github.com/kikito/lua-sandbox.git
synced 2024-12-18 03:04:20 +00:00
Added option "allow_string_rep", which enables using string.rep() from the sandbox
This commit is contained in:
parent
e04ddbe3ae
commit
406161751b
@ -161,7 +161,9 @@ function sandbox.protect(code, options)
|
|||||||
sethook(timeout, "", quota)
|
sethook(timeout, "", quota)
|
||||||
end
|
end
|
||||||
|
|
||||||
string.rep = nil -- luacheck: no global
|
if not options.allow_string_rep then
|
||||||
|
string.rep = nil -- luacheck: no global
|
||||||
|
end
|
||||||
|
|
||||||
local t = table.pack(pcall(f, ...))
|
local t = table.pack(pcall(f, ...))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user