2 ms·
Interesting idea. That seems like a lot of work, not to mention the same origin policy issues. Why not just validate it server side? A simple server side script
by tlrobinson 19y ago
Interesting idea. That seems like a lot of work, not to mention the same origin policy issues. Why not just validate it server side? A simple server side script could pull the JavaScript from the advertiser, verify it, and pass it on to the client.
Or use a public key signature and verify it client-side, though that would require the encryption algorithm implemented in JavaScript.
However, why do advertisement need JavaScript in the first place? As demonstrated by this incident, you're trusting the advertisers not to do bad things on your site.
- icky 19y ago> Why not just validate it server side? A simple server side script could pull the JavaScript from the advertiser, verify it, and pass it on to the client. See my addendum: http://news.ycombinator.com/item?id=101149 http://news.ycombinator.com/item?id=101149