Re:Why does Google append while(1); in front of their JSON r...
by tptacek on Monday February 04, 2013 @09:03PM
(#5168592)
Along the same lines, see how you feel about browser security in general after reading: http://lcamtuf.coredump.cx/postxss/
Re:Why does Google append while(1); in front of their JSON r...
by a3_nm on Tuesday February 05, 2013 @03:26AM
(#5169729)
There's a great book about browser security by the same author: _The Tangled Web_ <http://lcamtuf.coredump.cx/tangled/>;
Re:Why does Google append while(1); in front of their JSON r...
by saturdayplace on Tuesday February 05, 2013 @11:12AM
(#5171388)
Thank you for this link. As someone just getting started in web app security this was eye-opening.
Re:Why does Google append while(1); in front of their JSON r...
by olalonde on Monday February 04, 2013 @10:16PM
(#5168812)
Note that this bug doesn't affect modern browsers AFAIK (just tested on Chrome). Firefox fixed this bug back in 2007 for instance.
Re:Why does Google append while(1); in front of their JSON r...
by blablabla123 on Tuesday February 05, 2013 @06:35AM
(#5170151)
I agree... I mean look at JSONP, that's basically the inverse hack. After all: what's the point of enforcing same-origin-policy in AJAX but ignoring it for <script>?
Re:Why does Google append while(1); in front of their JSON r...
by mmahemoff on Tuesday February 05, 2013 @09:52AM
(#5170865)
The actual reason for this is web advertising took off like wildfire, using 3rd party scripts. It was too late to reverse by the time people got concerned about the security model.
Content Security Policy makes all this much more robust in modern browsers.
Re:Why does Google append while(1); in front of their JSON r...
by dspeyer on Tuesday February 05, 2013 @01:03PM
(#5172092)
JSONP lets the server turn off the same-origin policy. If XRFing your data is dangerous, don't use JSONP. But often we don't care about XRF, and the person writing the server is well-placed to know.
Now I find that workaround sweet: but it's still a total kludge and that such kludges are used just shows how poorly security has been conceived from the ground up in browsers / JavaScript.