How can I sandbox untrusted user-submitted JavaScript content?

Create a well defined message interface and use JavaScript Web Worker for the code you want to sandbox. HTML5 Web Workers Web Workers do not have access to the following DOM objects. The window object The document object The parent object So they can’t redirect your page or alter data on it. You can create … Read more

Capabilities for Lua: what experience is there?

I can’t speak to Lua but for Javascript, Caja has tooling to create a proper sandbox, limiting access to only certain functions. It was originally created to build a sandbox for HTML/JS widgets (like those used on iGoogle). http://code.google.com/p/google-caja/ Here’s a description of the project from their homepage: Caja (pronounced “KA-ha”), is a Spanish word … Read more

How can you run Javascript using Rhino for Java in a sandbox?

To guard against infinite loops, you can observe the instruction count as the script runs (this works only with interpreted scripts, not with compiled ones). There is this example in the Rhino JavaDocs to prevent a script from running for more than ten seconds: protected void observeInstructionCount(Context cx, int instructionCount) { MyContext mcx = (MyContext)cx; … Read more

Blocked script execution in because the document’s frame is sandboxed – Angular application

The error message warns that an Iframe is sand-boxed without a proper privileges Yes, you are clicking in an iFrame. This is an example of a sand-boxed iFrame. <iframe sandbox src=”http://usercontent.example.net/getusercontent.cgi?id=12193″></iframe> If you inspect element on GMail, you will notice iFrames everywhere. The sandbox attribute is not always automatically attached, because the sandbox attribute controls … Read more

How do sites like codepad.org and ideone.com sandbox your program?

codepad.org has something based on geordi, which runs everything in a chroot (i.e restricted to a subtree of the filesystem) with resource restrictions, and uses the ptrace API to restrict the untrusted program’s use of system calls. See http://codepad.org/about . I’ve previously used Systrace, another utility for restricting system calls. If the policy is set … Read more

The request was aborted: Could not create SSL/TLS secure channel sandbox account

I just ran into this same problem in my testing environment as well (luckily my live payments are going through). I fixed it by changing: public PayPalAPI(string specialAccount = “”) { System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls; to public PayPalAPI(string specialAccount = “”) { System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; They disabled support for SSL3 a while ago: https://www.paypal.com/uk/webapps/mpp/ssl-security-update, specifically stating … Read more

How to create a lightweight C code sandbox?

Since the C standard is much too broad to be allowed, you would need to go the other way around: specify the minimum subset of C which you need, and try to implement that. Even ANSI C is already too complicated and allows unwanted behaviour. The aspect of C which is most problematic are the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)