Restricting Python's syntax to execute user code safely. Is this a safe approach?

后端 未结 3 712
鱼传尺愫
鱼传尺愫 2020-12-14 04:00

Original question:

Executing mathematical user code on a python web server, what is the simplest secure way?

  • I want to be able to run user submitted co
3条回答
  •  抹茶落季
    2020-12-14 04:57

    Have you looked at pypy's sandboxing features? It is reputedly much safer than any CPython sandboxing efforts. You can even limit the heap size and cpu execution time to prevent denial of service.

提交回复
热议问题