News for hackers. Stuff that matters.
Re:All About E: The Language That Infiltrated JavaScript by kragen on Thursday October 27, 2022 @03:49PM (#33363052)
The objective of Jessie and the other capability-secure dialects of JS is to allow you to import malicious code in a web app without allowing it to either wreak or wreck any havoc. You can imagine lots of ways this could be useful.
Re:All About E: The Language That Infiltrated JavaScript by goto11 on Thursday October 27, 2022 @05:13PM (#33364121)
I guess I have a hard time seeing how Object.freeze() protects against malicious code, when any malicious script can still access the global object? I can understand something like the "Shadow realms" proposal, where a modules access to global objects can be constrained.
Re:All About E: The Language That Infiltrated JavaScript by kragen on Thursday October 27, 2022 @06:36PM (#33364928)
In things like Jessie or ADsafe, confined scripts are screened to ensure that they do not access the global object.
Re:All About E: The Language That Infiltrated JavaScript by goto11 on Friday October 28, 2022 @09:55AM (#33371428)
So am I correct in the understanding that Object.freeze in JavaScript does not provide any useful protection against malicious code? But in a different language, or a hypothetical future version of JavaScript, it might play a role in such a protection?
Re:All About E: The Language That Infiltrated JavaScript by kragen on Friday October 28, 2022 @12:45PM (#33373893)
I think it provides, at best, very limited useful protection against malicious code that has access to the whole JS language, but it means that Jessie can include enormously more of JS than ADsafe did.
Re:All About E: The Language That Infiltrated JavaScript by cztomsik on Friday October 28, 2022 @10:04AM (#33371528)
ShadowRealm + Object.freeze() could be enough to create safe env for untrusted code.