lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, Jun 8, 2010 at 9:10 AM,  <> wrote:
> Hi!
> I'm working on a sandboxed version of Lua which can be called from PHP to allow users to run their own scripts. It's quite safe so far, the only problem is that users may create infinite loops, use all system memory or have their scripts run for a very long time.
> Is there any way of solving these problems? A function like set_time_limit() in PHP would be great, or the possibility to overwrite the normal while- and for-loops with a custom implementation that e.g. allows only up to 1000 iterations.
> Another issue is the memory problem, how can I be sure the user doesn't create variables over variables and thus spams the system memory?


There are many threads on this subject. Google more if those don't
answer all your questions :).

- Patrick Donnelly