Reputation: 1891
I'm creating an application where users can pass codes around. My question is how does sites like jsfiddle or jsbin ensure that the code people save and pass around to one another are not malicious to the receiving client?
Upvotes: 1
Views: 52
Reputation: 490433
They can't really. They run the code in an iframe
in a way that it violates Same Origin Policy, to protect their own site. Other than that, it's at the end user's risk.
It's really the same as visiting any untrusted site on the internet in terms of security.
Upvotes: 5