diff --git a/sandbox.lua b/sandbox.lua index ce345f8..6b5edd1 100644 --- a/sandbox.lua +++ b/sandbox.lua @@ -161,7 +161,9 @@ function sandbox.protect(code, options) sethook(timeout, "", quota) 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, ...))