[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Sandboxing (was Re: Lua 5.1.1 has been frozen)
- From: Mark Hamburg <mhamburg@...>
- Date: Wed, 14 Jun 2006 14:03:43 -0700
The simplest route to sandboxing probably consists of:
1. Write a routine to do a recursive copy on tables. It probably needs to be
aware of table cycles but only if you care about exporting _G or the
2. Build a table containing just the items you want available.
3. After loading the string to execute, do a setfenv with a deep copy (1) of
the table created in (2).
Lazy versions of (1) based on proxy tables, but that has its own set of