lua-users home
lua-l archive

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

He I come to explain myselt again: I don't want sandboxing. I want a program that allow be to test if the user is using lua functions *other*than*the*ones*I*allow*him*to*use* not even what most lua programers consider *normal* to a lua program.

For this I believe I need something called a lexical analyser, so that I can allow only a sunset of normal LUA syntax.

thanks for all the help so far...

Ben Sunshine-Hill escreveu:
On 8/22/05, Alain <> wrote:

Thanks Ben for the information, but that is not enough. It does protect
a function to alter some things, but a skilled (auto-nominated) can use
other ways to access what he is not suposed to use.

I what I really am looking for is validating a minimal Lua-subset and
avoiding commands unknown by me to get into the scripts.

I am Ssorry to ask the same quastion 3 times, but I feel that I did not
make myself clear enough :(

I don't think you quite understand. In Lua, the only way to access or
change things outside the "sandbox" is through functions. If you don't
expose any functions that give users the power to change stuff, they
won't be able to change stuff no matter how "auto-nominated" (?) they
are. There is simply no way for a script to add functions which do
things the script couldn't already do.

Here's an example: WebLua, available at . This script executes
arbitrary code server-side, and as far as I know doesn't need anything
for full security except a carefully chosen set of global functions
and normal limits on CPU time and memory usage.

You'll find that when it comes to sandboxing, simple solutions are
usually more secure than complicated ones. Trying to perform static
analysis of a script's security is more or less impossible.