We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just spent today working on a sandboxing thing from a different angle before I found this. Turns out it's actually somewhat complementary!
iframe.contentWindow.eval
"use strict";
You can take a look at what I got on this in https://github.com/natevw/evel/blob/master/evel.js#L49 — I do whitelist the ES5 globals because I assume most code should be allowed to expect them. I'll be the first to admit that masking every global every function call is kind of "not ideal" but AFAICT combining https://github.com/natevw/evel's tricks with this iframe stuff yields a fairly declawed environment.
The text was updated successfully, but these errors were encountered:
For implementation, take a look at this! : https://www.w3schools.com/tags/att_iframe_sandbox.asp
Sorry, something went wrong.
No branches or pull requests
Just spent today working on a sandboxing thing from a different angle before I found this. Turns out it's actually somewhat complementary!
iframe.contentWindow.eval
trick does a great job preventing an untrusted script from messing with other people's object prototypes."use strict";
with a silly closure trick it seems possible to prevent access to all global objects…except object literal prototypes!You can take a look at what I got on this in https://github.com/natevw/evel/blob/master/evel.js#L49 — I do whitelist the ES5 globals because I assume most code should be allowed to expect them. I'll be the first to admit that masking every global every function call is kind of "not ideal" but AFAICT combining https://github.com/natevw/evel's tricks with this iframe stuff yields a fairly declawed environment.
The text was updated successfully, but these errors were encountered: