Open codeHusky opened 9 years ago
I tried adding a
Well yeah, but you could use this to skip over the injection of KA's infinite loop protection for scripts
Also allows you to do this kind of thing. https://www.khanacademy.org/computer-programming/danger-script/6527297851752448
@MikaalSky I added an infinite loop to your first example and the infinite loop protection code caught it. Are you suggesting that a user could add a <script>
tag or an <iframe>
that contains a script that has an infinite loop? In that case, I think the CSP would protect against that.
I agree that we should probably do something to guard against adding <iframes>
and <script>
tags to the page. This will probably require creating a "safe" version of document
that throws exceptions when trying to create certain types of elements via createElement
.
Pretty self explanatory on this program. https://www.khanacademy.org/computer-programming/finished/5731082677518336