So I'm in the process of building a game in C++ for the engine and Python for behavior and moddability. One of the planned major features is that when the game client connects to a game server with mods, the server will tell the client where to get the mods. This introduces a security problem for the client as a mod with malicious code could be downloaded. How can I limit python so that mods can not affect the system outside of the game?
-
\$\begingroup\$ Broad for sure, but this brings up some good concerns. I hope to see some answers to this. \$\endgroup\$– EvanJul 2, 2014 at 18:17
-
\$\begingroup\$ this may not be exactly what you're going for, but you might want to look into using some way of limiting mod file access. Maybe look into using PhysicsFS, which claims to be designed for running untrusted scripts (although I have not personally used it myself) \$\endgroup\$– clearlyspam23Jul 2, 2014 at 18:33
1 Answer
I've researched this same issue, but for a different platform. What you're looking for is called a "sandbox."