I am writing a PHP script that takes javascript code and writes it out in someones browser, works great, but I want the javascript to be able to be written by anyone, so I need to validate that certain things are not added to the javascript code like redirects and alert boxes.
What I’m asking is simply for suggestions for things to be censored out of the javascript, I have a fairly extensive list right now but I just want to make sure there is not anything obvious, or extremely obscure I have missed.
In all honesty, working with PHP and JavaScript can be a bit of hell. Preventing dangerous JavaScript isn’t 100% foolproof, as some can just load their own JavaScript code from a different domain and just do what they please.
However, you mention that you have a “honeypot” of sorts?