Added option "allow_string_rep", which enables using string.rep() from the sandbox

This commit is contained in:
claudix 2024-03-13 17:18:06 +01:00 committed by GitHub
parent e04ddbe3ae
commit 406161751b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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, ...))