[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Sandboxing
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Fri, 20 Jan 2012 12:58:46 +0100
On Fri, Jan 20, 2012 at 11:35, Peter Cawley <lua@corsix.org> wrote:
> 2012/1/20 Pierre-Yves Gérardy <pygy79@gmail.com>:
>> local function safe_loadstring (s,chunkname)
>> if s:match"^%.Lua" then
>> return false, "Attempt to load bytecode." -- are there other
>> bytecode signatures?
>
> That check won't detect bytecode. You'd probably be better with "if
> s:byte() == 27 then".
>
Indeed, stupid misatke.
Thanks.
-- Pierre-Yves