Please don't do that.Originally Posted by Mokhtar
Please don't do that.Originally Posted by Mokhtar
if you really wanted to limit syntax usage you would have to dig into provided scripts with lpeg or something, which would involve implementing some or all of lua's grammar, then throw an error if it finds a match... this might not even catch everything, though
it's fairly easy to sandbox user scripts in lua (but the way you do it will change in 5.2), but this still means you have to pay attention so you don't accidentally expose the global environment through a library function or something
but yes, as already mentioned, a fair amount of "security holes" when it comes to sandboxing are in the form of functions which you can either nil out, or if you are using a sandbox, not provide
i believe line-by-line debugging would be possible through the debug.sethook() function (and other debug.* ones)... but last i tried using that function in xlua it didn't work
XLua uses hooks for backtrace reporting, so maybe you'll have to turn that off first? XLua also provides an alternative hard sandbox that exists in a separate state, although it may not be the best choice.
My best advise to anyone who really wants a debugger or a text editor is to either use an external one that allows it, or make one yourself. Its a fair project to take upOriginally Posted by Retriever2
doesn't seem to work eitherOriginally Posted by Retriever2