I have heard arguments made against the idea on the basis that it would unnecessarily restrict game developers at no gain to the users. I disagree on both points. The wealth of enjoyable games that have been made in the Flash and Java restricted environments is outstanding. I think most games can be limited to only a specific subset of OS resources: keyboard, joystick, graphics, sound, mouse etc.
The argument that the OS and the user should take care of security are in-part true, but it doesn't fly with me as a complete justification for lack of ever including security sandboxing. For a user to know if they can trust a given .love game is a very complicated task:
- It isn't sensible for the user to trust games from a given website. I imagine someone could even anonymously submit a .love game to the love2d.org site's Games section in the wiki and include some carefully concealed malicious code. A site that does do stringent checks for malicious code in games submitted by an unknown third party could be hacked via a security flaw in a piece of server side software like the HTTP server or an FTP server. A malicious cracker could then inject malicious code into the games stored on the server; perhaps bot-net code, which upon execution of the .love game installs a botnet client on the end-users machine, placing that machine under the control of an unknown third party.
- It isn't sensible for a user to trust a particular developer. It is likely that most often the user will never know exactly who the developer is. The developer is likely completely anonymous, whose only point of contact is an email address. If they performed all their game submitting, email and forum posting via a proxy server then they could affectively do all the damage they wanted (for personal gain or just the sociopathic challenge) and receive zero consequence.
A quick google for "lua security sandbox" reveals lots of information on how to sandbox untrusted code. One example. http://lua-users.org/wiki/SandBoxes.
The official lua home page has this statement in the documentation: "Because all functions that interface Lua with the operating system are provided in external libraries, it is easy to restrict the power of the interpreter in order to provide adequate security. " source: http://www.lua.org/spe.html
I really do think that you are creating a fantastic piece of software for game development, but it feels like a missed opportunity if security sandboxing isn't added to the engine. Adding security sandboxing to other similar projects (eg PyGame) would be a far more complicated endeavor; if not, completely unfeasible. It would be nice to offer peace-of-mind and protection to the computers of Love gamers without them having to be security experts.
When I explain basic security to my non-geek, friends and family I normally tell them. "Websites you visit are quite safe. They are caged within your web browser so they can't access your files and programs etc. If you run a program though, like a .exe, you are effectively giving the person who created that program access to your keyboard, mouse and all your files." It's not a perfect way of explaining it, but it conveys the major points. It would be nice to be able to tell people that .love games are like websites. You are safe. Just enjoy the games! ^_^
-Akima