[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: config-file for a config-language: where the cat meet its tail ?!?
- From: Justin Cormack <justin@...>
- Date: Sat, 14 Jul 2012 13:20:01 +0100
On Sat, Jul 14, 2012 at 10:54 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> https://github.com/stevedonovan/Penlight/blob/master/lua/pl/pretty.lua
>
> These functions have a paranoid mode in which they try to trap any
> attempt to set up loops. They also suppress the default string
> metatable temporarily so that people can't call potentially dangerous
> string methods. This code works for both Lua 5.1 and 5.2, which have
> somewhat different load methods.
>
> (If anybody knows of a way to break the sandbox here, I'd be happy to hear)
Cant you just get back the old string metatable with
getmetatable('').old__index and therefore access all those functions?
You should hide it outside the provided environment...
Justin